Information recommendation method, device, electronic device and readable storage medium
By iteratively training the information recommendation model, combining information content, interaction and user attributes, and calculating the recommendation coefficient, the problem of low accuracy of information recommendation in the existing technology is solved, and more accurate and stable information push is achieved.
Patent Information
- Application Number
- CN202110779707.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-09
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-07-09
AI Technical Summary
The existing information recommendation model only considers user click feedback, with fewer evaluation dimensions, resulting in low recommendation accuracy and inability to push the information that users really need.
By obtaining the user's historical information recommendation request, iteratively train the information recommendation model, extracting information content attributes, information interaction attributes and user attributes, calculating recommendation coefficients, filtering and sorting information data, and sending a sequence of recommendation information data.
It improves the accuracy of information recommendation, better model performance, can predict user needs more accurately, and enhances the robustness of recommendations.
Smart Images

Figure CN113515703B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent decision-making, and in particular to an information recommendation method, device, electronic device and readable storage medium. Background Art
[0002] Due to the timeliness of information data and the volatility of user preferences, real-time personalized information data recommendation is a very challenging problem. Although there are some real-time recommendation models in the industry to solve the problem of information data recommendation, these recommendation models currently only consider user click feedback, and the model feedback evaluation dimensions are relatively small, resulting in the recommendation model being unable to push the information that users really need, and the accuracy of information recommendation is low. Summary of the invention
[0003] The present invention provides an information recommendation method, device, electronic device and computer-readable storage medium, the main purpose of which is to improve the accuracy of information recommendation.
[0004] To achieve the above object, the present invention provides an information recommendation method, comprising:
[0005] Upon receiving an information recommendation request from a user, obtaining historical recommendation information corresponding to all historical information recommendation requests of the user;
[0006] Iteratively training the current information recommendation model according to the historical recommendation information to obtain an updated information recommendation model;
[0007] Acquire an information data set according to the information recommendation request, extract information content attributes and information interaction attributes of each information data in the information data set, and extract corresponding information content features and information interaction features from the information content attributes and the information interaction attributes respectively;
[0008] Extracting user attributes from the user information recommendation request to obtain user features;
[0009] Calculating the recommendation coefficient of each information data in the information data set using the updated information recommendation model according to the information interaction characteristics, information content characteristics and user characteristics;
[0010] The information data in the information data set are screened and sorted according to the recommendation coefficient to obtain a recommended information data sequence, and the recommended information data sequence is sent to the user.
[0011] Optionally, the iteratively training the current information recommendation model according to the historical recommendation information to obtain an updated information recommendation model includes:
[0012] Obtaining the request time of the information recommendation request, and extracting the request time in each of the historical information recommendation requests;
[0013] Combining all the extracted request times in chronological order to obtain a request time sequence;
[0014] Determine whether the number of request times in the request time sequence is greater than 1;
[0015] When the number of request times in the request time sequence is greater than 1, all the historical recommendation information is screened according to the request time sequence to obtain target historical recommendation information, and the current information recommendation model is trained using the target historical recommendation information to obtain an updated information recommendation model;
[0016] When the number of request times in the request time sequence is equal to 1, the current information recommendation model is determined as an updated information recommendation model.
[0017] Optionally, the filtering of all the historical recommendation information according to the request time sequence to obtain target historical recommendation information, and training the current information recommendation model using the target historical recommendation information to obtain an updated information recommendation model includes:
[0018] Select the last request time and the second last request time in the request time sequence to construct a target time interval;
[0019] Select the historical recommendation information corresponding to the second-to-last request time in the request time sequence to obtain the target historical recommendation information, and obtain the user click information corresponding to each information data in the target historical recommendation information within the target time interval;
[0020] Calculate the activity probability of each piece of information data in the target historical recommended information using a preset algorithm according to the user click information;
[0021] Extracting the number of user clicks from the user click information, and performing calculations based on the number of user clicks and the active probability to obtain a historical recommendation coefficient;
[0022] The information recommendation model is iteratively trained according to the target historical recommendation information and the historical recommendation coefficient to obtain the updated information recommendation model.
[0023] Optionally, the iteratively training the information recommendation model according to the target historical recommendation information and the recommendation coefficient to obtain the updated information recommendation model includes:
[0024] Step A: performing feature conversion on each information data in the target historical recommendation information to obtain an initial sample;
[0025] Step B: using the historical recommendation coefficient to label the initial sample to obtain a training sample;
[0026] Step C: using the information recommendation model to predict the initial sample and obtain a prediction coefficient;
[0027] Step D: Use a preset loss function to calculate the loss value of the prediction coefficient and the historical recommendation coefficient corresponding to the training sample. When the loss value is greater than or equal to the preset loss threshold, adjust the model parameters of the information recommendation model and return to step C; when the loss value is less than the preset loss threshold, stop the training of the information recommendation model to obtain an updated information recommendation model.
[0028] Optionally, acquiring the information data set according to the information recommendation request includes:
[0029] Determining the request time of the information recommendation request as the target request time;
[0030] Constructing a recommended time interval according to the target request time and a preset time period;
[0031] All information data in a preset information recommendation database are screened using the recommended time interval to obtain the information data set.
[0032] Optionally, constructing a recommended time interval according to the target request time and a preset time period includes:
[0033] Taking the target request time as the right endpoint of the interval;
[0034] Taking the time period as the interval length;
[0035] An interval is constructed according to the right endpoint of the interval and the interval length to obtain the recommended time interval.
[0036] Optionally, the filtering and sorting the information data in the information data set according to the recommendation coefficient to obtain a recommended information data sequence includes:
[0037] Filter the information data set whose recommendation coefficient value is greater than a preset threshold to obtain an initial information data sequence;
[0038] All information data in the initial information data sequence are sorted in order of the corresponding recommendation coefficients to obtain the recommended information data sequence.
[0039] In order to solve the above problem, the present invention further provides an information recommendation device, the device comprising:
[0040] The model updating module is used to obtain the historical recommendation information corresponding to all the historical information recommendation requests of the user upon receiving the information recommendation request of the user; iteratively train the current information recommendation model according to the historical recommendation information to obtain the updated information recommendation model;
[0041] a feature extraction module, configured to obtain an information data set according to the information recommendation request, extract information content attributes and information interaction attributes of each information data in the information data set, and respectively extract corresponding information content features and information interaction features from the information content attributes and the information interaction attributes; and extract user attributes in the user information recommendation request to obtain user features;
[0042] An information recommendation module is used to calculate the recommendation coefficient of each information data in the information data set according to the information interaction characteristics, information content characteristics and user characteristics using the updated information recommendation model; filter and sort the information data in the information data set according to the recommendation coefficient to obtain a recommended information data sequence, and send the recommended information data sequence to the user.
[0043] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0044] a memory storing at least one computer program; and
[0045] The processor executes the computer program stored in the memory to implement the above-mentioned information recommendation method.
[0046] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned information recommendation method.
[0047] The embodiment of the present invention obtains the historical recommendation information corresponding to all the historical information recommendation requests of the user when receiving the information recommendation request of the user; iteratively trains the current information recommendation model according to the historical recommendation information to obtain the updated information recommendation model, and updates the model by using the user's feedback on the information that is beneficial to the recommendation, so that the performance of the model is better and the prediction is more accurate; obtains the information data set according to the information recommendation request, extracts the information content attribute and the information interaction attribute of each information data in the information data set, and extracts the corresponding information content feature and information interaction feature from the information content attribute and the information interaction attribute respectively; extracts the user attribute in the user information recommendation request to obtain the user feature; calculates the recommendation coefficient of each information data in the information data set according to the information interaction feature, the information content feature and the user feature, and trains the model by using the multidimensional feature, so that the model has better robustness and improves the accuracy of information recommendation; screens and sorts the information data in the information data set according to the recommendation coefficient to obtain the recommended information data sequence, and sends the recommended information data sequence to the user. Therefore, the information recommendation method, device, electronic device and readable storage medium proposed in the embodiment of the present invention improve the accuracy of information recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of a flow chart of an information recommendation method provided by an embodiment of the present invention;
[0049] Figure 2 A schematic diagram of modules of an information recommendation device provided by an embodiment of the present invention;
[0050] Figure 3 A schematic diagram of the internal structure of an electronic device for implementing an information recommendation method provided by an embodiment of the present invention;
[0051] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0053] The embodiment of the present invention provides an information recommendation method. The execution subject of the information recommendation method includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the information recommendation method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0054] Reference Figure 1 FIG. 1 is a flow chart of an information recommendation method provided by an embodiment of the present invention. In the embodiment of the present invention, the information recommendation method includes:
[0055] S1. upon receiving an information recommendation request from a user, obtaining historical recommendation information corresponding to all historical information recommendation requests of the user;
[0056] In the embodiment of the present invention, the information recommendation request includes: the user's request time, the user's attributes, and the user's personal information.
[0057] Specifically, in the embodiment of the present invention, the historical information recommendation request is an information recommendation request initiated by the user before initiating the current information recommendation request. Therefore, the historical information recommendation request also includes: the user's request time, user attributes, and user personal information. The historical recommendation information is the information recommended in response to the corresponding historical information recommendation request.
[0058] S2. Iteratively train the current information recommendation model according to the historical recommendation information to obtain an updated information recommendation model;
[0059] Optionally, the current information recommendation model in the embodiment of the present invention is a deep Q network model.
[0060] In detail, in an embodiment of the present invention, the current information recommendation model is iteratively trained according to the historical recommendation information to obtain an updated information recommendation model, including: extracting the request time in each of the historical information recommendation requests and the request time in the information recommendation request; combining all the extracted request times in chronological order to obtain a request time sequence, for example: the information recommendation request is the information recommendation request of user A, and the request time corresponding to the request is t4. User A has initiated three user information recommendation requests before initiating this user information recommendation request. Then there are three historical recommendation requests in total. The request time corresponding to the first historical recommendation request is t1, the request time corresponding to the second historical recommendation request is t2, and the request time corresponding to the third historical recommendation request is t3. t1 <t2<t3,t4> t3, then the request time sequence is [t1, t2, t3, t4]; further, an embodiment of the present invention determines whether the number of request times in the request time sequence is greater than 1, wherein the number of request times in the request time sequence is the number of request times contained in the request time sequence, for example: the request time sequence is [t1, t2, t3, t4], which includes request times t1, t2, t3, and t4, then the number of request times in the request time sequence is 4; when the number of request times in the request time sequence is greater than 1, all the historical recommendation information is filtered according to the request time sequence to obtain the target historical recommendation information, and the information recommendation model is trained using the target historical recommendation information to obtain the updated information recommendation model; when the number of request times in the request time sequence is equal to 1, the information recommendation model is determined to be the updated information recommendation model.
[0061] In detail, in an embodiment of the present invention, the penultimate request time and the penultimate request time in the request time sequence are selected to construct a target time interval. For example, the request time sequence is [t1, t2, t3, t4]. It can be seen from the above that the times in the request time sequence are arranged in chronological order. Therefore, the time interval constructed by the penultimate request time t4 and the penultimate request time t3 in the request time sequence is [t3, t4].
[0062] Specifically, in an embodiment of the present invention, filtering all the historical recommendation information according to the request time sequence to obtain target historical recommendation information includes: selecting the historical recommendation information corresponding to the second to last request time in the request time sequence to obtain the target historical recommendation information.
[0063] Furthermore, the user click information corresponding to each information data in the target historical recommendation information within the target time interval is obtained; based on the user click information, the activity probability of each information data in the target historical recommendation information is calculated using a preset algorithm. The user click information includes the number of user clicks and the number and time of the user returning to browse the system where the information data is located. For example: if the information data is news data in a news APP, then the number and time of the user returning to browse the system where the information data is located is the number and time of the user opening the APP.
[0064] Furthermore, in an embodiment of the present invention, the number of user clicks in the user click information is extracted, and a historical recommendation coefficient is obtained based on the number of user clicks and the active probability. For example, if the number of user clicks corresponding to information data A is 5 and the active probability is 0.6, then the historical recommendation coefficient corresponding to information data A is 5+0.6=5.6. The information recommendation model is iteratively trained based on the target historical recommendation information and the historical recommendation coefficient to obtain an updated information recommendation model. Optionally, in an embodiment of the present invention, the information recommendation model is a deep Q learning model.
[0065] Optionally, the preset algorithm in the embodiment of the present invention may be performed using the following formula:
[0066]
[0067] Among them, S(t) is the user's active probability, λ is the risk function set, t2 is the penultimate time, t1 is the penultimate time, S a is the preset initial activity. Every time a user returns to the system where the browsing information data is located within the target time interval, the user activity probability is reset to
[0068]
[0069] Wherein, h is the time when the user last returned to the system where the browsing information data is located within the target time interval.
[0070] Furthermore, in an embodiment of the present invention, a preset algorithm is used to calculate the activity probability of each information data in the target historical recommendation information, including: when the activity probability is greater than a preset value, the preset value is determined as the activity probability, wherein the preset value is 1.
[0071] In summary, in an embodiment of the present invention, the information recommendation model is trained using the target historical recommendation information to obtain an updated information recommendation model, including: selecting the last request time and the second last request time in the request time series to construct an interval to obtain a target time interval; obtaining user click information corresponding to each information data in the target historical recommendation information within the target time interval; calculating the activity probability of each information data in the target historical recommendation information using a preset algorithm based on the user click information; extracting the number of user clicks in the user click information, and calculating based on the number of user clicks and the activity probability to obtain a historical recommendation coefficient; iteratively training the information recommendation model based on the target historical recommendation information and the historical recommendation coefficient to obtain the updated information recommendation model.
[0072] In detail, in the embodiment of the present invention, the information recommendation model is iteratively trained according to the target historical recommendation information and the historical recommendation coefficient to obtain the updated information recommendation model, including:
[0073] Step A: performing feature conversion on each information data in the target historical recommendation information to obtain a corresponding initial sample;
[0074] In detail, an embodiment of the present invention performs feature conversion on each information data in the target historical recommendation information to obtain a corresponding initial sample, including: extracting information content features, information interaction features and user features corresponding to each information data in the target historical recommendation information to obtain a corresponding initial sample.
[0075] Step B: using the historical recommendation coefficient to mark the corresponding initial sample to obtain a training sample;
[0076] Step C: using the information recommendation model to predict the initial sample and obtain a prediction coefficient;
[0077] Step D: Use a preset loss function to calculate the loss value of the prediction coefficient and the historical recommendation coefficient corresponding to the training sample. When the loss value is greater than or equal to the preset loss threshold, adjust the model parameters of the information recommendation model and return to step C; when the loss value is less than the preset loss threshold, stop the training of the information recommendation model to obtain an updated information recommendation model.
[0078] S3, acquiring an information data set according to the information recommendation request, extracting information content attributes and information interaction attributes of each information data in the information data set, and extracting corresponding information content features and information interaction features from the information content attributes and the information interaction attributes respectively;
[0079] In an embodiment of the present invention, the information data set is a set of multiple information data. In one application scenario of the present invention, the information data is news.
[0080] In detail, the method of acquiring the information data set according to the information recommendation request in the embodiment of the present invention includes: determining the request time of the information recommendation request as the target request time; constructing a recommended time interval according to the target request time and a preset time period; specifically, the embodiment of the present invention uses the target request time as the right end point of the interval; uses the time period as the length of the interval; constructs an interval according to the right end point of the interval and the length of the interval to obtain the recommended time interval, for example: if the target request time is 12:00 and the time period is 1 hour, then the constructed recommended time interval is [11:00, 12:00]. . Further, in the embodiment of the present invention, all information data in a preset information database are screened using the recommended time interval to obtain the information data set. Wherein, the information database is a database that is continuously updated over time. Further, in order to ensure the timeliness of information recommendation, the embodiment of the present invention does not need old data in the information database. Therefore, the embodiment of the present invention uses the recommended time interval to screen all information data in the preset information database, and screens the information data in the information database whose data writing time is within the recommended time interval to obtain the information data set.
[0081] Specifically, the information content attributes are features of certain attributes of the corresponding information data, including title, provider, ranking, entity name, category, subject category, and the number of clicks in the last hour, 6 hours, 24 hours, 1 week, and 1 year. In the embodiment of the present invention, the information content attributes of each information data in the information data set are converted into a vector to obtain the corresponding information content features.
[0082] Furthermore, in an embodiment of the present invention, the information interaction attribute is the interaction between the user and the corresponding information data, including the frequency of the corresponding entity attribute of the information data appearing in the reading history of the user, and the entity attribute includes: the category of the information data, the subject category of the information data and the provider of the information data. The corresponding information interaction attribute in the information data set is converted into a vector to obtain the corresponding information interaction feature.
[0083] In another embodiment of the present invention, the information data set is stored in the blockchain node by utilizing the high throughput characteristic of the blockchain to improve the efficiency of data access.
[0084] S4, extracting user attributes in the user information recommendation request to obtain user features;
[0085] In an embodiment of the present invention, the user attributes are characteristics of information browsed by the user within a preset time period, such as characteristics of news clicked by the user within 1 hour, 6 hours, 24 hours, 1 week and 1 year (i.e., title, provider, ranking, entity name, category and subject category).
[0086] Furthermore, the embodiment of the present invention converts the user attributes into vectors to obtain the user features.
[0087] Optionally, in an embodiment of the present invention, a preset Word2vec model trained by transfer learning based on professional domain knowledge texts (such as teaching materials, training materials) can be used for vector conversion.
[0088] S5. Calculate the recommendation coefficient of each information data in the information data set by using the information recommendation model according to the information interaction characteristics, information content characteristics and user characteristics;
[0089] In detail, in the embodiment of the present invention, the information interaction features, information content features and user features corresponding to each information data in the information data set are input into the information recommendation model to obtain the corresponding recommendation coefficient.
[0090] S6. Filter and sort the information data in the information data set according to the recommendation coefficient to obtain a recommended information data sequence, and send the recommended information data sequence to a terminal device corresponding to the user information recommendation request.
[0091] In detail, in an embodiment of the present invention, information data whose corresponding recommendation coefficient values are greater than a preset threshold value in the information data set are screened to obtain an initial information data sequence; all information data in the initial information data sequence are sorted in order of the corresponding recommendation coefficients to obtain the recommended information data sequence, for example: there are five information data A, B, C, D, and E in the information data set, the recommendation coefficient corresponding to A is 0.9, the recommendation coefficient corresponding to B is 0.91, the recommendation coefficient corresponding to C is 0.8, the recommendation coefficient corresponding to D is 0.92, and the recommendation coefficient corresponding to E is 0.7, and the preset threshold value is 0.8, then the initial information sequence contains A, B, and D; all information data in the initial information data sequence are sorted in order of the corresponding recommendation coefficients to obtain the recommended information data sequence [D, B, A].
[0092] Furthermore, in an embodiment of the present invention, the recommendation information data sequence is sent to a terminal device corresponding to the user information recommendation request, and the terminal device includes: a smart terminal such as a mobile phone, a tablet, and a computer.
[0093] like Figure 2 FIG. 1 is a functional module diagram of the information recommendation device of the present invention.
[0094] The information recommendation device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the information recommendation device can include a model updating module 101, a feature extraction module 102, and an information recommendation module 103. The modules described in the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and are stored in a memory of the electronic device.
[0095] In this embodiment, the functions of each module / unit are as follows:
[0096] The model updating module 101 is used to obtain the historical recommendation information corresponding to all the historical information recommendation requests of the user when receiving the information recommendation request of the user; iteratively train the current information recommendation model according to the historical recommendation information to obtain an updated information recommendation model;
[0097] In the embodiment of the present invention, the information recommendation request includes: the user's request time, the user's attributes, and the user's personal information.
[0098] Specifically, in the embodiment of the present invention, the historical information recommendation request is an information recommendation request initiated by the user before initiating the current information recommendation request. Therefore, the historical information recommendation request also includes: the user's request time, user attributes, and user personal information. The historical recommendation information is the information recommended in response to the corresponding historical information recommendation request.
[0099] Optionally, the current information recommendation model in the embodiment of the present invention is a deep Q network model.
[0100] In detail, the model updating module 101 in the embodiment of the present invention iteratively trains the current information recommendation model according to the historical recommendation information to obtain an updated information recommendation model, including: extracting the request time in each of the historical information recommendation requests and the request time in the information recommendation request; combining all the extracted request times in chronological order to obtain a request time sequence, for example: the information recommendation request is the information recommendation request of user A, and the request time corresponding to the request is t4. User A has initiated three user information recommendation requests before initiating this user information recommendation request. Then there are three historical recommendation requests in total. The request time corresponding to the first historical recommendation request is t1, the request time corresponding to the second historical recommendation request is t2, and the request time corresponding to the third historical recommendation request is t3. t1 <t2<t3,t4> t3, then the request time sequence is [t1, t2, t3, t4]; further, an embodiment of the present invention determines whether the number of request times in the request time sequence is greater than 1, wherein the number of request times in the request time sequence is the number of request times contained in the request time sequence, for example: the request time sequence is [t1, t2, t3, t4], which includes request times t1, t2, t3, and t4, then the number of request times in the request time sequence is 4; when the number of request times in the request time sequence is greater than 1, the model update module 101 filters all the historical recommendation information according to the request time sequence to obtain the target historical recommendation information, and uses the target historical recommendation information to train the information recommendation model to obtain the updated information recommendation model; when the number of request times in the request time sequence is equal to 1, the model update module 101 determines the information recommendation model as the updated information recommendation model.
[0101] Specifically, in an embodiment of the present invention, the model updating module 101 filters all the historical recommendation information according to the request time sequence to obtain target historical recommendation information, including: selecting the historical recommendation information corresponding to the second request time of the derivative in the request time sequence to obtain the target historical recommendation information.
[0102] In detail, in an embodiment of the present invention, the model updating module 101 selects the penultimate request time and the penultimate request time in the request time sequence to construct an interval to obtain a target time interval. For example, the request time sequence is [t1, t2, t3, t4]. From the above, it can be seen that the time in the request time sequence is arranged in chronological order. Therefore, the time interval constructed by the penultimate request time t4 and the penultimate request time t3 in the request time sequence is [t3, t4].
[0103] Furthermore, the model update module 101 obtains the user click information corresponding to each information data in the target historical recommendation information within the target time interval; based on the user click information, a preset algorithm is used to calculate the activity probability of each information data in the target historical recommendation information. Among them, the user click information includes the number of user clicks and the number and time of the user returning to browse the system where the information data is located. For example: if the information data is news data in a news APP, then the number and time of the user returning to browse the system where the information data is located is the number and time of the user opening the APP.
[0104] Furthermore, in an embodiment of the present invention, the model updating module 101 extracts the number of user clicks in the user click information, and calculates according to the number of user clicks and the active probability to obtain a historical recommendation coefficient. For example, if the number of user clicks corresponding to information data A is 5 and the active probability is 0.6, then the historical recommendation coefficient corresponding to information data A is 5+0.6=5.6. The information recommendation model is iteratively trained according to the target historical recommendation information and the historical recommendation coefficient to obtain an updated information recommendation model. Optionally, in an embodiment of the present invention, the information recommendation model is a deep Q learning model.
[0105] Optionally, the preset algorithm in the embodiment of the present invention may be performed using the following formula:
[0106]
[0107] Among them, S(t) is the user's active probability, λ is the risk function set, t2 is the penultimate time, t1 is the penultimate time, S a is the preset initial activity. Every time a user returns to the system where the browsing information data is located within the target time interval, the user activity probability is reset to
[0108]
[0109] Wherein, h is the time when the user last returned to the system where the browsing information data is located within the target time interval.
[0110] Furthermore, in the embodiment of the present invention, the model updating module 101 uses a preset algorithm to calculate the activity probability of each information data in the target historical recommendation information, including: when the activity probability is greater than a preset value, the preset value is determined as the activity probability, wherein the preset value is 1.
[0111] In summary, in an embodiment of the present invention, the model updating module 101 uses the target historical recommendation information to train the information recommendation model to obtain an updated information recommendation model, including: selecting the last request time and the second last request time in the request time sequence to construct an interval to obtain a target time interval; obtaining the user click information corresponding to each information data in the target historical recommendation information within the target time interval; calculating the activity probability of each information data in the target historical recommendation information using a preset algorithm based on the user click information; extracting the number of user clicks in the user click information, and calculating according to the number of user clicks and the activity probability to obtain a historical recommendation coefficient; iteratively training the information recommendation model based on the target historical recommendation information and the historical recommendation coefficient to obtain the updated information recommendation model.
[0112] In detail, the model updating module 101 in the embodiment of the present invention iteratively trains the information recommendation model according to the target historical recommendation information and the historical recommendation coefficient to obtain the updated information recommendation model, including:
[0113] Step A: performing feature conversion on each information data in the target historical recommendation information to obtain a corresponding initial sample;
[0114] In detail, an embodiment of the present invention performs feature conversion on each information data in the target historical recommendation information to obtain a corresponding initial sample, including: extracting information content features, information interaction features and user features corresponding to each information data in the target historical recommendation information to obtain a corresponding initial sample.
[0115] Step B: using the historical recommendation coefficient to mark the corresponding initial sample to obtain a training sample;
[0116] Step C: using the information recommendation model to predict the initial sample and obtain a prediction coefficient;
[0117] Step D: Use a preset loss function to calculate the loss value of the prediction coefficient and the historical recommendation coefficient corresponding to the training sample. When the loss value is greater than or equal to the preset loss threshold, adjust the model parameters of the information recommendation model and return to step C; when the loss value is less than the preset loss threshold, stop the training of the information recommendation model to obtain an updated information recommendation model.
[0118] The feature extraction module 102 is used to obtain an information data set according to the information recommendation request, extract the information content attributes and information interaction attributes of each information data in the information data set, and respectively extract corresponding information content features and information interaction features from the information content attributes and the information interaction attributes; extract user attributes in the user information recommendation request to obtain user features;
[0119] In an embodiment of the present invention, the information data set is a set of multiple information data. In one application scenario of the present invention, the information data is news.
[0120] In detail, the feature extraction module 102 in the embodiment of the present invention obtains the information data set according to the information recommendation request, including: determining the request time corresponding to the information recommendation request as the target request time; constructing a recommended time interval according to the target request time and the preset time period; specifically, the embodiment of the present invention uses the target request time as the right endpoint of the interval; uses the time period as the interval length; constructs an interval according to the right endpoint of the interval and the interval length to obtain the recommended time interval, for example: the target request time is 12:00, the time period is 1 hour, then the constructed recommended time interval is [11:00, 12:00]. . Further, the feature extraction module 102 in the embodiment of the present invention uses the recommended time interval to filter all information data in the preset information database to obtain the information data set. Among them, the information database is a database that is continuously updated over time. Furthermore, in order to ensure the timeliness of information recommendation, the embodiment of the present invention does not need old data in the information database. Therefore, the feature extraction module 102 in the embodiment of the present invention uses the recommended time interval to filter all information data in the preset information database, and filters the information data in the information database whose data writing time is within the recommended time interval to obtain the information data set.
[0121] Specifically, the information content attributes are features of certain attributes of the corresponding information data, including title, provider, ranking, entity name, category, subject category, and the number of clicks in the last hour, 6 hours, 24 hours, 1 week, and 1 year. In the embodiment of the present invention, the information content attributes of each information data in the information data set are converted into a vector to obtain the corresponding information content features.
[0122] Furthermore, in an embodiment of the present invention, the information interaction attribute is the interaction between the user and the corresponding information data, including the frequency of the corresponding entity attribute of the information data appearing in the reading history of the user, and the entity attribute includes: the category of the information data, the subject category of the information data and the provider of the information data. The corresponding information interaction attribute in the information data set is converted into a vector to obtain the corresponding information interaction feature.
[0123] In another embodiment of the present invention, the information data set is stored in the blockchain node by utilizing the high throughput characteristic of the blockchain to improve the efficiency of data access.
[0124] In an embodiment of the present invention, the user attributes are characteristics of information browsed by the user within a preset time period, such as characteristics of news clicked by the user within 1 hour, 6 hours, 24 hours, 1 week and 1 year (i.e., title, provider, ranking, entity name, category and subject category).
[0125] Furthermore, the feature extraction module 102 in the embodiment of the present invention converts the user attributes into vectors to obtain the user features.
[0126] Optionally, in an embodiment of the present invention, a preset Word2vec model trained by transfer learning based on professional domain knowledge texts (such as teaching materials, training materials) can be used for vector conversion.
[0127] The information recommendation module 103 is used to calculate the recommendation coefficient of each information data in the information data set according to the information interaction characteristics, information content characteristics and user characteristics using the updated information recommendation model; filter and sort the information data in the information data set according to the recommendation coefficient to obtain a recommended information data sequence, and send the recommended information data sequence to the user.
[0128] In detail, the information recommendation module 103 in the embodiment of the present invention inputs the information interaction feature, information content feature and user feature corresponding to each information data in the information data set into the information recommendation model to obtain the corresponding recommendation coefficient.
[0129] In detail, in an embodiment of the present invention, the information recommendation module 103 screens the information data whose corresponding recommendation coefficient values in the information data set are greater than a preset threshold value to obtain an initial information data sequence; all the information data in the initial information data sequence are sorted in order of the corresponding recommendation coefficients to obtain the recommended information data sequence, for example: there are five information data A, B, C, D, and E in the information data set, the recommendation coefficient corresponding to A is 0.9, the recommendation coefficient corresponding to B is 0.91, the recommendation coefficient corresponding to C is 0.8, the recommendation coefficient corresponding to D is 0.92, and the recommendation coefficient corresponding to E is 0.7, and the preset threshold value is 0.8, then the initial information sequence contains A, B, and D; all the information data in the initial information data sequence are sorted in order of the corresponding recommendation coefficients to obtain the recommended information data sequence [D, B, A].
[0130] Furthermore, in an embodiment of the present invention, the recommendation information data sequence is sent to a terminal device corresponding to the user information recommendation request, and the terminal device includes: a smart terminal such as a mobile phone, a tablet, and a computer.
[0131] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing the information recommendation method of the present invention.
[0132] The electronic device may include a processor 10 , a memory 11 , a communication bus 12 , and a communication interface 13 , and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as an information recommendation program.
[0133] Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. The memory 11 may be an internal storage unit of an electronic device in some embodiments, such as a mobile hard disk of the electronic device. The memory 11 may also be an external storage device of an electronic device in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can be used not only to store application software and various types of data installed in the electronic device, such as the code of the information recommendation program, but also to temporarily store data that has been output or is to be output.
[0134] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as information recommendation programs, etc.) stored in the memory 11, and calls data stored in the memory 11 to execute various functions of the electronic device and process data.
[0135] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0136] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0137] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0138] Optionally, the communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.
[0139] Optionally, the communication interface 13 may also include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0140] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0141] The information recommendation program stored in the memory 11 of the electronic device is a combination of multiple computer programs. When running in the processor 10, it can achieve:
[0142] Upon receiving an information recommendation request from a user, obtaining historical recommendation information corresponding to all historical information recommendation requests of the user;
[0143] Iteratively training the current information recommendation model according to the historical recommendation information to obtain an updated information recommendation model;
[0144] Acquire an information data set according to the information recommendation request, extract information content attributes and information interaction attributes of each information data in the information data set, and extract corresponding information content features and information interaction features from the information content attributes and the information interaction attributes respectively;
[0145] Extracting user attributes from the user information recommendation request to obtain user features;
[0146] Calculating the recommendation coefficient of each information data in the information data set using the updated information recommendation model according to the information interaction characteristics, information content characteristics and user characteristics;
[0147] The information data in the information data set are screened and sorted according to the recommendation coefficient to obtain a recommended information data sequence, and the recommended information data sequence is sent to the user.
[0148] Specifically, the specific implementation method of the processor 10 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0149] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable medium can be non-volatile or volatile. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM).
[0150] An embodiment of the present invention may further provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:
[0151] Upon receiving an information recommendation request from a user, obtaining historical recommendation information corresponding to all historical information recommendation requests of the user;
[0152] Iteratively training the current information recommendation model according to the historical recommendation information to obtain an updated information recommendation model;
[0153] Acquire an information data set according to the information recommendation request, extract information content attributes and information interaction attributes of each information data in the information data set, and extract corresponding information content features and information interaction features from the information content attributes and the information interaction attributes respectively;
[0154] Extracting user attributes from the user information recommendation request to obtain user features;
[0155] Calculating the recommendation coefficient of each information data in the information data set using the updated information recommendation model according to the information interaction characteristics, information content characteristics and user characteristics;
[0156] The information data in the information data set are screened and sorted according to the recommendation coefficient to obtain a recommended information data sequence, and the recommended information data sequence is sent to the user.
[0157] Furthermore, the computer-usable storage medium may mainly 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, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0158] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0159] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0160] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0161] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0162] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0163] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0164] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. An information recommendation method, characterized in that: The method comprises: Upon receiving an information recommendation request from a user, obtaining historical recommendation information corresponding to all historical information recommendation requests of the user; Iteratively training the current information recommendation model according to the historical recommendation information to obtain an updated information recommendation model; Acquire an information data set according to the information recommendation request, extract information content attributes and information interaction attributes of each information data in the information data set, and extract corresponding information content features and information interaction features from the information content attributes and the information interaction attributes respectively; Extracting user attributes from the user information recommendation request to obtain user features; Calculating the recommendation coefficient of each information data in the information data set using the updated information recommendation model according to the information interaction characteristics, information content characteristics and user characteristics; The information data in the information data set are screened and sorted according to the recommendation coefficient to obtain a recommended information data sequence, and the recommended information data sequence is sent to the user.
2. The information recommendation method according to claim 1, characterized in that: The iterative training of the current information recommendation model according to the historical recommendation information to obtain an updated information recommendation model includes: Obtaining the request time of the information recommendation request, and extracting the request time in each of the historical information recommendation requests; Combining all the extracted request times in chronological order to obtain a request time sequence; Determine whether the number of request times in the request time sequence is greater than 1; When the number of request times in the request time sequence is greater than 1, all the historical recommendation information is screened according to the request time sequence to obtain target historical recommendation information, and the current information recommendation model is trained using the target historical recommendation information to obtain an updated information recommendation model; When the number of request times in the request time sequence is equal to 1, the current information recommendation model is determined as an updated information recommendation model.
3. The information recommendation method according to claim 2, characterized in that: The step of screening all the historical recommendation information according to the request time sequence to obtain target historical recommendation information, and training the current information recommendation model using the target historical recommendation information to obtain an updated information recommendation model includes: Select the last request time and the second last request time in the request time sequence to construct a target time interval; Select the historical recommendation information corresponding to the second-to-last request time in the request time sequence to obtain the target historical recommendation information, and obtain the user click information corresponding to each information data in the target historical recommendation information within the target time interval; Calculate the activity probability of each piece of information data in the target historical recommended information using a preset algorithm according to the user click information; Extracting the number of user clicks from the user click information, and performing calculations based on the number of user clicks and the active probability to obtain a historical recommendation coefficient; The information recommendation model is iteratively trained according to the target historical recommendation information and the historical recommendation coefficient to obtain the updated information recommendation model.
4. The information recommendation method according to claim 3, characterized in that: The iterative training of the information recommendation model according to the target historical recommendation information and the recommendation coefficient to obtain the updated information recommendation model includes: Step A: performing feature conversion on each information data in the target historical recommendation information to obtain an initial sample; Step B: using the historical recommendation coefficient to label the initial sample to obtain a training sample; Step C: using the information recommendation model to predict the initial sample and obtain a prediction coefficient; Step D: Use a preset loss function to calculate the loss value of the prediction coefficient and the historical recommendation coefficient corresponding to the training sample. When the loss value is greater than or equal to a preset loss threshold, adjust the model parameters of the information recommendation model and return to step C; when the loss value is less than the preset loss threshold, stop training the information recommendation model to obtain an updated information recommendation model.
5. The information recommendation method according to claim 2, characterized in that: The obtaining of the information data set according to the information recommendation request includes: Determining the request time of the information recommendation request as the target request time; Constructing a recommended time interval according to the target request time and a preset time period; All information data in a preset information recommendation database are screened using the recommended time interval to obtain the information data set.
6. The information recommendation method according to claim 5, characterized in that: The constructing a recommended time interval according to the target request time and a preset time period includes: Taking the target request time as the right endpoint of the interval; Taking the time period as the interval length; An interval is constructed according to the right endpoint of the interval and the interval length to obtain the recommended time interval.
7. The information recommendation method according to any one of claims 1 to 6, characterized in that: The step of screening and sorting the information data in the information data set according to the recommendation coefficient to obtain a recommended information data sequence includes: Filter the information data set whose recommendation coefficient value is greater than a preset threshold to obtain an initial information data sequence; All information data in the initial information data sequence are sorted in order of the corresponding recommendation coefficients to obtain the recommended information data sequence.
8. An information recommendation method, characterized in that: include: A model updating module, configured to, upon receiving an information recommendation request from a user, obtain historical recommendation information corresponding to all historical information recommendation requests from the user; Iteratively training the current information recommendation model according to the historical recommendation information to obtain an updated information recommendation model; a feature extraction module, configured to obtain an information data set according to the information recommendation request, extract information content attributes and information interaction attributes of each information data in the information data set, and respectively extract corresponding information content features and information interaction features from the information content attributes and the information interaction attributes; and extract user attributes in the user information recommendation request to obtain user features; An information recommendation module is used to calculate the recommendation coefficient of each information data in the information data set according to the information interaction characteristics, information content characteristics and user characteristics using the updated information recommendation model; filter and sort the information data in the information data set according to the recommendation coefficient to obtain a recommended information data sequence, and send the recommended information data sequence to the user.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to perform the information recommendation method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the information recommendation method according to any one of claims 1 to 7 is implemented.
