CN112732892B - Course recommendation method, device, equipment and storage medium - Google Patents

Course recommendation method, device, equipment and storage medium Download PDF

Info

Publication number
CN112732892B
CN112732892B CN202011609487.5A CN202011609487A CN112732892B CN 112732892 B CN112732892 B CN 112732892B CN 202011609487 A CN202011609487 A CN 202011609487A CN 112732892 B CN112732892 B CN 112732892B
Authority
CN
China
Prior art keywords
course
user
data
updated
course name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011609487.5A
Other languages
Chinese (zh)
Other versions
CN112732892A (en
Inventor
严杨扬
程克喜
肖舒涛
晏湘涛
张政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202011609487.5A priority Critical patent/CN112732892B/en
Priority to PCT/CN2021/091727 priority patent/WO2022142043A1/en
Publication of CN112732892A publication Critical patent/CN112732892A/en
Application granted granted Critical
Publication of CN112732892B publication Critical patent/CN112732892B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance

Abstract

The application relates to the technical field of artificial intelligence, and discloses a course recommendation method, a device, equipment and a storage medium, wherein the method comprises the following steps: segmenting the curriculum name data set to be updated and updating a curriculum name segmentation library; updating a user preference tag library according to a user preference tag data set to be updated; based on the data updating request, acquiring a course name word segmentation result from a course name word segmentation library and generating a word vector to obtain a target course name word segmentation vector set, and acquiring user preference label data from a user preference label library and generating a word vector to obtain a target user preference label word vector set; generating a similarity matrix according to the word segmentation word vector set of the target course name and the target user preference label word vector set and updating a similarity matrix library; and obtaining target course recommendation results corresponding to the user identifications according to the similarity matrix library. After the course and/or the user preference label are updated, the learning course which is really interested by the user is dynamically and deeply mined.

Description

Course recommendation method, device, equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a course recommendation method, apparatus, device, and storage medium.
Background
The online teaching platform at the present stage does not have the function of intelligently recommending learning courses for users, and the users only learn the courses manually pushed by a platform system administrator in the background monotonously, so that the recommending mode enables employees to be passive, the interesting courses are difficult to find, and the learning enthusiasm of the users cannot be mobilized.
Disclosure of Invention
The main purpose of the present application is to provide a course recommendation method, device, equipment and storage medium, which aim to solve the technical problem that a user of an online teaching platform in the prior art can only learn the course manually pushed by a platform system administrator in the background monotonously, and can not mobilize the learning enthusiasm of the user.
In order to achieve the above object, the present application provides a course recommendation method, including:
acquiring a data updating request;
when the data updating request is a recommendation request after course updating, acquiring a course name data set to be updated, performing word segmentation on each course name in the course name data set to be updated by adopting preset course batch processing parameters to obtain a course name word segmentation result corresponding to each course name corresponding to the course name data set to be updated, and updating a course name word segmentation library according to the course name word segmentation result corresponding to each course name corresponding to the course name data set to be updated;
when the data updating request is a recommendation request after the user favorite tag is updated, acquiring a user favorite tag data set to be updated, and updating a user favorite tag library according to the user favorite tag data set to be updated by adopting preset user batch processing parameters;
obtaining the course name word segmentation result from the course name word segmentation library based on the data updating request to obtain a target course name word segmentation result set, and respectively generating a word vector for each course name word segmentation result in the target course name word segmentation result set to obtain a target course name word segmentation vector set corresponding to the target course name word segmentation result set;
acquiring user preference label data from the user preference label library based on the data updating request to obtain a target user preference label data set, and respectively performing word vector generation on each user preference label data in the target user preference label data set to obtain a target user preference label word vector set corresponding to the target user preference label data set;
performing similarity matrix generation according to the target course name word segmentation word vector set and the target user preference label word vector set to obtain a similarity matrix of the course to be updated and the preference label, and updating a similarity matrix library according to the similarity matrix of the course to be updated and the preference label;
and acquiring a course recommendation updating request based on the data updating request, and recommending courses by adopting a preset recommendation rule according to the similarity matrix library and the user identification set to be recommended carried by the course recommendation updating request to obtain target course recommendation results corresponding to the user identifications of the user identification set to be recommended.
Further, the step of obtaining a data update request includes:
acquiring a data updating notice sent by Kafka message middleware;
when the data updating notification is a course name updating notification, generating the recommended request of the data updating request after the course is updated;
and when the data updating notification is a user favorite label updating notification, generating a recommendation request of the data updating request after the user favorite label is updated.
Further, adopting preset course batch processing parameters to respectively segment each course name in the course name dataset to be updated, obtaining each course name segmentation result corresponding to the course name dataset to be updated, and updating the course name segmentation library according to each course name segmentation result corresponding to the course name dataset to be updated, including:
acquiring batch processing parameters of the preset courses;
when the course name data set to be updated comprises course name data needing to be deleted, deleting the course name word segmentation library according to the course name data needing to be deleted;
when the course name data set to be updated comprises the course name data to be newly added, the method is adopted to preset course batch processing parameters, and the course name data to be newly added is divided into words, so that the course name data to be newly added is obtained, the course name corresponds to each other, the course name division result is stored in the course name division library, and the course name data to be newly added is divided into words.
Further, adopt it is right respectively to predetermine course batch processing parameter every in the course name data that need newly-increased the course name carries out the participle, obtains in the course name data that need newly-increased each the course name corresponds respectively before the step of course name participle result, include:
acquiring a batch processing time length monitoring result and the preset course batch processing parameters;
when the batch processing time length monitoring result is larger than the batch processing interval data of the preset course batch processing parameters, determining the course batch processing parameters to be updated according to the batch processing time length monitoring result;
and updating the preset course batch processing parameters according to the course batch processing parameters to be updated.
Further, the step of determining batch processing parameters of the courses to be updated according to the monitoring result of the batch processing duration includes:
acquiring the number of CPU cores, block interval data and a preset proportion;
multiplying the batch processing time length monitoring result by the preset proportion to obtain batch processing interval data corresponding to the batch processing parameters of the courses to be updated;
and calculating the size of a sliding window and the sliding interval data according to the batch processing interval data corresponding to the batch processing parameters of the curriculum to be updated, so as to obtain the size of the sliding window and the sliding interval data corresponding to the batch processing parameters of the curriculum to be updated.
Further, the step of updating the user preference tag library according to the to-be-updated user preference tag data set by using the preset user batch processing parameters includes:
acquiring a piece of user favorite label data from the user favorite label data set to be updated by adopting the preset user batch processing parameter to obtain the user favorite label data to be processed;
adding favorite labels needing to be added in the to-be-processed user favorite label data into the user favorite label library according to the user identification corresponding to the to-be-processed user favorite label data;
deleting favorite labels needing to be deleted in the to-be-processed user favorite label data from the user favorite label library according to the user identification corresponding to the to-be-processed user favorite label data;
and repeatedly executing the step of acquiring one piece of user favorite tag data from the to-be-updated user favorite tag data set by adopting the preset user batch processing parameter to obtain the to-be-processed user favorite tag data until the update of all the user favorite tag data in the to-be-updated user favorite tag data set to the user favorite tag library is completed.
Further, the step of performing course recommendation by using a preset recommendation rule according to the similarity matrix library and the user identifier set to be recommended carried by the course recommendation update request to obtain target course recommendation results corresponding to each user identifier of the user identifier set to be recommended respectively includes:
searching the user identification set to be recommended carried by the course recommendation updating request in the similarity matrix library to obtain a course and preference label similarity matrix corresponding to each user identification of the user identification set to be recommended;
acquiring a preset similarity threshold;
acquiring one user identifier from the user identifier set to be recommended as a user identifier to be recommended;
finding out the similarity between the courses and the like labels which is greater than the preset similarity threshold from the similarity matrix between the courses and the like labels corresponding to the user identification to be recommended, and taking all the course names corresponding to the found similarity between the courses and the like labels as the target course recommendation result corresponding to the user identification to be recommended;
and repeatedly executing the step of obtaining one user identifier from the user identifier set to be recommended as the user identifier to be recommended until the target course recommendation result corresponding to each user identifier in the user identifier set to be recommended is determined.
The present application further provides a course recommendation device, the device includes:
the request acquisition module is used for acquiring a data updating request;
a course name participle library updating module, configured to, when the data update request is a recommendation request after a course is updated, obtain a course name dataset to be updated, perform participle on each course name in the course name dataset to be updated by using a preset course batch processing parameter, obtain a course name participle result corresponding to each course name corresponding to the course name dataset to be updated, and update a course name participle library according to the course name participle result corresponding to each course name corresponding to the course name dataset to be updated;
the user preference tag library updating module is used for acquiring a user preference tag data set to be updated when the data updating request is a recommendation request after the user preference tag is updated, and updating the user preference tag library according to the user preference tag data set to be updated by adopting a preset user batch processing parameter;
a target course name participle word vector set determining module, configured to obtain the course name participle result from the course name participle library based on the data update request, to obtain a target course name participle result set, and perform word vector generation on each course name participle result in the target course name participle result set, to obtain a target course name participle word vector set corresponding to the target course name participle result set;
a target user preference tag word vector set determining module, configured to obtain user preference tag data from the user preference tag library based on the data update request, to obtain a target user preference tag data set, and perform word vector generation on each user preference tag data in the target user preference tag data set, to obtain a target user preference tag word vector set corresponding to the target user preference tag data set;
a similarity matrix generation module, configured to perform similarity matrix generation according to the target course name participle word vector set and the target user preference label word vector set to obtain a similarity matrix between the course to be updated and the preference label, and update a similarity matrix library according to the similarity matrix between the course to be updated and the preference label;
and the course recommending module is used for acquiring a course recommending and updating request based on the data updating request, recommending courses by adopting a preset recommending rule according to the similarity matrix library and the user identification set to be recommended carried by the course recommending and updating request, and obtaining target course recommending results corresponding to each user identification of the user identification set to be recommended.
The present application further proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of any one of the above methods when executing the computer program.
The present application also proposes a computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of the method of any one of the above.
The course recommending method, device, equipment and storage medium of the application are characterized in that when a data updating request is a recommendation request after course updating, preset course batch processing parameters are adopted to respectively segment each course name in a course name data set to be updated and update a course name segmentation word library, when the data updating request is a recommendation request after user preference tag updating, preset user batch processing parameters are adopted to update the user preference tag library according to a user preference tag data set to be updated, then word vector generation is carried out by acquiring a course name segmentation result from the course name segmentation word library based on the data updating request to obtain a target course name segmentation word vector set, word vector generation is carried out by acquiring user preference tag data from the user preference tag library based on the data updating request to obtain a target course name segmentation word set, and then phase matching is carried out according to the target course name segmentation word vector set and the target user preference tag vector set And finally, carrying out course recommendation according to the similarity matrix library and a user identification set carried by a course recommendation updating request by adopting a preset recommendation rule, and obtaining target course recommendation results corresponding to each user identification of the user identification set to be recommended, so that learning courses really interested by the user are dynamically and deeply mined after course updating and/or user preference labels are updated, the timeliness of course recommendation is favorably improved, the accuracy of course recommendation is improved, and the enthusiasm of user learning is favorably mobilized.
Drawings
FIG. 1 is a flowchart illustrating a course recommendation method according to an embodiment of the present application;
FIG. 2 is a block diagram of a course recommender according to an embodiment of the present application;
fig. 3 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
The implementation of the objectives, functional features, and advantages of the present application will be further described with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In order to solve the technical problems that users of an online teaching platform in the prior art can only learn courses manually pushed by a platform system administrator in the background monotonously and can not mobilize the learning enthusiasm of the users, the application provides a course recommendation method, and the method is applied to the technical field of artificial intelligence. The course recommending method comprises the steps of segmenting updated course names after course updating, updating the course name segmentation library, updating the user favor label library according to a user favor label data set to be updated after user favor labels are updated, obtaining course name segmentation results and user favor label data according to updated types (namely course updating and user favor label updating), generating word vectors respectively, generating similarity matrixes according to the word vector generation results, and recommending courses according to the similarity matrixes, so that learning courses which are really interested by users are dynamically and deeply mined after course updating and/or user favor labels are updated, timeliness of course recommending is improved, accuracy of course recommending is improved, and enthusiasm of learning of the users is promoted.
Referring to fig. 1, an embodiment of the present application provides a course recommendation method, where the method includes:
s1: acquiring a data updating request;
s2: when the data updating request is a recommendation request after course updating, acquiring a course name data set to be updated, performing word segmentation on each course name in the course name data set to be updated by adopting preset course batch processing parameters to obtain a course name word segmentation result corresponding to each course name corresponding to the course name data set to be updated, and updating a course name word segmentation library according to the course name word segmentation result corresponding to each course name corresponding to the course name data set to be updated;
s3: when the data updating request is a recommendation request after the user favorite tag is updated, acquiring a user favorite tag data set to be updated, and updating a user favorite tag library according to the user favorite tag data set to be updated by adopting preset user batch processing parameters;
s4: obtaining the course name word segmentation result from the course name word segmentation library based on the data updating request to obtain a target course name word segmentation result set, and respectively generating a word vector for each course name word segmentation result in the target course name word segmentation result set to obtain a target course name word segmentation vector set corresponding to the target course name word segmentation result set;
s5: acquiring user preference label data from the user preference label library based on the data updating request to obtain a target user preference label data set, and respectively performing word vector generation on each user preference label data in the target user preference label data set to obtain a target user preference label word vector set corresponding to the target user preference label data set;
s6: performing similarity matrix generation according to the target course name word segmentation word vector set and the target user preference label word vector set to obtain a similarity matrix of the course to be updated and the preference label, and updating a similarity matrix library according to the similarity matrix of the course to be updated and the preference label;
s7: and acquiring a course recommendation updating request based on the data updating request, and recommending courses by adopting a preset recommendation rule according to the similarity matrix library and the user identification set to be recommended carried by the course recommendation updating request to obtain target course recommendation results corresponding to the user identifications of the user identification set to be recommended.
The method includes the steps of firstly, when a data updating request is a recommendation request after course updating, adopting preset course batch processing parameters to respectively segment each course name in a course name data set to be updated and update a course name segmentation library, when the data updating request is a recommendation request after user preference labels are updated, adopting the preset user batch processing parameters to update the user preference label library according to a user preference label data set to be updated, secondly, obtaining a course name segmentation result from the course name segmentation library based on the data updating request to generate a target course name segmentation word vector set, obtaining user preference label data from the user preference label library based on the data updating request to generate a word vector to obtain a target course name segmentation word vector set, and then, generating a similarity matrix according to the target course name segmentation word vector set and the target user preference label word vector set to obtain a course to be updated and a preference label vector set And finally, carrying out course recommendation according to the similarity matrix library and a user identification set carried by a course recommendation update request by adopting a preset recommendation rule, and obtaining a target course recommendation result corresponding to each user identification of the user identification set to be recommended, so that learning courses really interested by the user are dynamically and deeply mined after course updating and/or user preference labels are updated, the timeliness of course recommendation is favorably improved, the accuracy of course recommendation is improved, and the enthusiasm of user learning is favorably mobilized.
For S1, the data update request input by the user may be acquired, or the data update request sent by the third-party application system may be acquired (for example, the data update request sent by Kafka message middleware is acquired by using the Apache Spark Streaming technology), or the data update request triggered by the program file implementing the present application may be acquired.
Kafka, a high throughput distributed publish-subscribe messaging system.
The data update request includes: the recommendation request after course updating and the recommendation request after user preference label updating.
The recommendation request after the course update refers to a request for recommending the course after the course name is updated.
The recommendation request after the user preference tag is updated refers to a request for course recommendation after the user preference tag is updated.
For S2, when the data update request is a recommendation request after a course is updated, the course name data set to be updated input by the user may be obtained, or the course name data set to be updated sent by a third-party application system (e.g., Kafka messaging middleware) may also be obtained.
The course name dataset to be updated includes: the course name identification corresponds to a course name, and each course name identification corresponds to a piece of course name data needing to be added and/or a piece of course name data needing to be deleted.
The course name participle library comprises: course name identification and course name word segmentation results, wherein each course name identification corresponds to one course name word segmentation result. Each course name word segmentation result comprises at least one word.
Optionally, the course name part word library is stored in a local database.
Presetting course batch processing parameters comprises: batch interval data, block interval data, sliding window size, sliding interval data.
The size of the sliding window refers to the size of the sliding window.
The sliding interval data refers to a time interval of a sliding window.
For example, if the number of CPU cores of each computer is 10, the batch processing interval data is set to 2S, and the block interval data is set to 200ms, so that the number of tasks corresponding to each batch is 10 (that is, 2S set by the batch processing interval data is divided by 200ms set by the block interval data), thereby making full use of each CPU core without losing the computational performance of the computer, which is not specifically limited in this example.
And setting the size of the sliding window and the sliding interval data as integral multiples of the batch processing interval data. Integer multiples include, but are not limited to: 1 time, 2 times, 3 times, 4 times and 5 times.
The method comprises the steps that a word segmentation tool is adopted to perform word segmentation on each course name in the newly-added course name data in a course name data set to be updated according to preset course batch processing parameters, all words obtained by word segmentation of one course name are used as a course name word segmentation result, and all the course name word segmentation results are added into a course name word segmentation library; and directly deleting the course name data needing to be deleted of the course name data set to be updated from the course name word segmentation library.
For S3, when the data update request is a recommendation request after the user favorite tag is updated, the user favorite tag data set to be updated input by the user may be obtained, or the user favorite tag data set to be updated may be obtained from a third-party software system.
Optionally, the tag thesaurus is stored in a local database.
The set of user preference tag data to be updated includes: user identification, favorite labels that need to be added, favorite labels that need to be deleted. The user identification may be a user name, a user ID, or the like that uniquely identifies a user.
The label word segmentation library comprises: user identification and user preference tag data, wherein each user identification corresponds to one user preference tag data. The user preference label data includes one or more preference labels. Each user preference tag data corresponds to a user.
The preset user batch processing parameters comprise: batch interval data, block interval data, sliding window size, sliding interval data.
And adding the favorite labels, which need to be added, of the user favorite label data set to be updated into a user favorite label library by adopting a preset user batch processing parameter, and deleting the favorite labels, which need to be deleted, of the user favorite label data set to be updated from the user favorite label library.
For S4, when the data updating request is a recommendation request after a course is updated, obtaining a result of segmenting the course name of the current time from the course name segmenting library, when the data updating request is a recommendation request after a user preference label is updated, obtaining all the results of segmenting the course name from the course name segmenting library, and taking all the obtained results of segmenting the course name as a target course name segmenting result set; and respectively generating word vectors for each course name word segmentation result in the target course name word segmentation result set, and taking all the generated word vectors as a target course name word segmentation vector set corresponding to the target course name word segmentation result set. That is, each course name participle result corresponds to one course name participle vector, and each course name participle vector corresponds to one course name.
For step S5, when the data updating request is a recommendation request after a course is updated, acquiring all user preference tag data from the user preference tag library, when the data updating request is a recommendation request after a user preference tag is updated, acquiring the updated user preference tag data from the user preference tag library, and taking all the acquired user preference tag data as a target user preference tag data set; and respectively generating word vectors for each user preference label data in the target user preference label data set, and taking all the generated word vectors as a target user preference label word vector set corresponding to the target user preference label data set. That is, each user preference tag data corresponds to one user preference tag word vector, and each user preference tag word vector corresponds to one user.
For step S6, a similarity matrix is generated for each course name participle word vector in the target course name participle word vector set and each user preference label word vector in the target user preference label word vector set, and the generated similarity matrix is used as a similarity matrix between the course and the preference label to be updated.
Each element of the similarity matrix of the course and the preference label to be updated represents the similarity of a course name participle word vector and a user preference label word vector. The method comprises the steps that a course to be updated corresponds to a course name word segmentation vector and a column corresponds to a user favorite label word vector, or the course to be updated corresponds to the course name word segmentation vector and the row corresponds to the user favorite label word vector.
Optionally, a cosine similarity algorithm is used to calculate a cosine similarity between each course name participle word vector in the target course name participle word vector set and each user preference label word vector in the target user preference label word vector set, so as to obtain a similarity matrix between the course to be updated and the preference label. That is, the element in the similarity matrix between the lesson to be updated and the favorite label is the cosine similarity.
The similarity matrix library comprises: the method comprises the following steps of user identification, course and preference label similarity matrixes, wherein each user identification corresponds to one course and preference label similarity matrix.
It is understood that the updating operation in the similarity matrix library according to the lesson to be updated and the like label similarity matrix includes, but is not limited to: overlay, add, partial overlay, partial delete, partial overlay and partial delete.
Optionally, the similarity matrix library is stored in a local Hbase database.
For S7, the course recommendation update request sent by the administrator may be obtained based on the data update request, the course recommendation update request generated based on the data update request after the program file of the present application receives the end signal of updating the similarity matrix library may be realized, or the course recommendation update request generated by the program file of the present application at a preset recommendation interval may be realized.
The course recommendation update request refers to a request for recommending courses to a user.
The step of recommending the update request based on the course generated by the data update request after the program file of the present application receives the end signal of updating the similarity matrix library includes: when the data updating request is a recommendation request after course updating, acquiring a preset user identifier set, and taking the preset user identifier set as the user identifier set to be recommended carried by the course recommendation updating request; and when the data updating request is a recommending request after the user preference tag is updated, taking all user identifications corresponding to the user preference tag data set to be updated as the user identification set to be recommended carried by the course recommending and updating request.
The set of user identifications to be recommended, that is, the set of user identifications of the users who need to perform course recommendation. The user identification set to be recommended comprises at least one user identification.
Searching a user identification set to be recommended carried by the course recommendation updating request from the similarity matrix library to obtain a course and preference label similarity matrix corresponding to each user identification of the user identification set to be recommended; and recommending courses by adopting a preset recommendation rule according to the similarity matrix of the courses and the favorite labels corresponding to the user identifications of the user identification set to be recommended to obtain target course recommendation results corresponding to the user identifications of the user identification set to be recommended.
The preset recommendation rules include, but are not limited to: the similarity is greater than a preset similarity threshold.
The target course recommendation result comprises: the course system comprises user identifications and course name sets, wherein each user identification corresponds to one course name set.
The course name set in the target course recommendation result is the course name set of the course which is actually interested by the user and corresponds to the user identification in the target course recommendation result.
In an embodiment, the step of obtaining the data update request includes:
s11: acquiring a data updating notice sent by Kafka message middleware;
s12: when the data updating notification is a course name updating notification, generating the recommended request of the data updating request after the course is updated;
s13: and when the data updating notification is a user favorite label updating notification, generating a recommendation request of the data updating request after the user favorite label is updated.
According to the embodiment, the data updating notification is acquired from the Kafka message middleware, and the data updating request is generated according to the data updating notification, so that the application is suitable for a distributed application scene; the effective management of course names needing to be updated and user preference labels needing to be updated is facilitated through the Kafka message middleware.
For S11, the Apache Spark Streaming technology is used to obtain the data update notification sent by the Kafka message middleware.
The data update notification is a notification for updating the course name and/or the user preference label.
With respect to S12, when the data update notification is a course name update notification, it means that the course name needs to be updated at this time, and therefore the recommendation request after the course update is generated.
For S13, when the data update notification is a user favorite label update notification, it means that the user favorite label needs to be updated at this time, so that the recommendation request after the user favorite label is updated is generated.
In an embodiment, the step of performing segmentation on each course name in the to-be-updated course name dataset by using preset course batch processing parameters to obtain a respective course name segmentation result corresponding to each course name corresponding to the to-be-updated course name dataset, and updating the course name segmentation library according to the respective course name segmentation result corresponding to each course name corresponding to the to-be-updated course name dataset includes:
s21: acquiring batch processing parameters of the preset courses;
s22: when the course name data set to be updated comprises course name data needing to be deleted, deleting the course name word segmentation library according to the course name data needing to be deleted;
s23: when the course name data set to be updated comprises the course name data to be newly added, the method is adopted to preset course batch processing parameters, and the course name data to be newly added is divided into words, so that the course name data to be newly added is obtained, the course name corresponds to each other, the course name division result is stored in the course name division library, and the course name data to be newly added is divided into words.
According to the method, the word segmentation is carried out on each course name in the course name data set to be updated, then the course name word segmentation library is updated, and a data basis is provided for the follow-up similarity matrix generation; and the word segmentation result is updated to the course name word segmentation library, so that the repeated utilization is facilitated, and the efficiency of generating the similarity matrix is improved.
For S21, the preset course batch processing parameter input by the user may be obtained, the preset course batch processing parameter may be obtained from a database, or the preset course batch processing parameter sent by the third-party application system may be obtained. It is to be understood that the preset course batch processing parameters can also be written into a program file for implementing the present application.
For S22, when the to-be-updated course name data set includes the course name data to be deleted, it means that the course corresponding to the course name data to be deleted no longer provides a service, and at this time, the course name data to be deleted needs to be deleted from the course name segmentation library, so as to avoid the situation that the course recommended to the user cannot be learned, and improve the user satisfaction.
For S23, when the to-be-updated course name data set includes the new course name data, it means that the course corresponding to the new course name data needs to be on-line for providing service, at this time, a word segmentation tool is used to perform word segmentation on each course name in the new course name data according to the preset course batch processing parameter in a sliding window manner, and a word set obtained by word segmentation of one course name is used as a result of word segmentation of the course name.
Optionally, the word segmentation tool selects a Chinese word segmentation tool with a Chinese word ending. It is understood that the word segmentation tool may also be selected from other tools known in the art, and is not specifically limited herein.
The Chinese word segmentation tool for the ending is also a jieba Chinese word segmentation tool, the Chinese word segmentation tool for the ending realizes efficient word graph scanning based on a prefix dictionary, generates a Directed Acyclic Graph (DAG) formed by all possible word forming conditions of Chinese characters in a sentence, searches a path with the maximum probability by using a dynamic programming algorithm, and finds out the maximum segmentation combination based on word frequency.
In an embodiment, before the step of obtaining the course name segmentation result corresponding to each of the course names in the to-be-newly-added course name data by using the preset course batch processing parameter to segment each of the course names in the to-be-newly-added course name data, the step includes:
s0231: acquiring a batch processing time length monitoring result and the preset course batch processing parameters;
s0232: when the batch processing time length monitoring result is larger than the batch processing interval data of the preset course batch processing parameters, determining the course batch processing parameters to be updated according to the batch processing time length monitoring result;
s0233: and updating the preset course batch processing parameters according to the course batch processing parameters to be updated.
This embodiment has realized adopting predetermine course batch processing parameter respectively right every in the course name data that need newly-increased the course name carries out the update of predetermineeing course batch processing parameter before the step of participling, be favorable to predetermineeing course batch processing parameter according to the length of time monitoring result adjustment of batch processing, avoided appearing not being totally updated to the problem in the course name participle storehouse because of predetermineeing the unreasonable course name data set that leads to waiting to update of course batch processing parameter setting.
For S0231, the batch processing time duration monitoring result may be obtained from the database, or the batch processing time duration monitoring result may be obtained from the cache.
The preset course batch processing parameters input by the user can be obtained, the preset course batch processing parameters can also be obtained from a database, and the preset course batch processing parameters can also be sent by a third-party application system.
For S0232, when the monitoring result of the batch processing duration is greater than the batch processing interval data of the preset course batch processing parameter, it means that the previous batch processing duration exceeds the expected batch processing interval data, at this time, the batch processing interval data of the preset course batch processing parameter needs to be adjusted, so as to avoid the situation that the next batch exceeds the expected batch processing interval data, calculate the batch processing interval data according to the monitoring result of the batch processing duration by using the preset batch processing interval adjustment rule, and use the calculated batch processing interval data as the batch processing interval data of the course batch processing parameter to be updated.
The preset batch interval adjustment rules include, but are not limited to: the proportion is preset.
And S0233, replacing the preset course batch processing parameter with the course batch processing parameter to be updated.
It can be understood that the method from step S0231 to step 0233 may also be adopted to update the preset user batch processing parameters, which is not described herein again.
In an embodiment, the step of determining batch processing parameters of the courses to be updated according to the monitoring result of the batch processing time duration includes:
s02331: acquiring the number of CPU cores, block interval data and a preset proportion;
s02332: multiplying the batch processing time length monitoring result by the preset proportion to obtain batch processing interval data corresponding to the batch processing parameters of the courses to be updated;
s02333: and calculating the size of a sliding window and the sliding interval data according to the batch processing interval data corresponding to the batch processing parameters of the curriculum to be updated, so as to obtain the size of the sliding window and the sliding interval data corresponding to the batch processing parameters of the curriculum to be updated.
According to the method and the device, the batch processing parameters of the curriculum to be updated are determined according to the batch processing time length monitoring result, the CPU core number and the block interval data, so that the calculated batch processing parameters of the curriculum to be updated are adjusted under the condition that the service performance of the server where the program file is located accords with the application, and the stability of the curriculum name word segmentation library is improved.
For S02331, the CPU (central processing unit) core number and block interval data may be acquired from the database, or may be acquired from the cache.
The CPU core number is the core number of the CPU of the server loaded when the program file of the present application provides the course recommendation service.
The block interval data is a time length for processing each data block by the server loaded when the program file of the present application provides the course recommendation service.
Optionally, the value range of the preset ratio is greater than 0.9 and less than 1.1.
And S02332, multiplying the monitoring result of the batch processing time length by the preset proportion, and taking the multiplied result as the batch processing interval data corresponding to the batch processing parameter of the curriculum to be updated.
For S02333, a first preset multiple and a second preset multiple are obtained; multiplying the batch processing interval data corresponding to the batch processing parameters of the curriculum to be updated by a first preset multiple to obtain the size of the sliding window corresponding to the batch processing parameters of the curriculum to be updated; and multiplying the batch processing interval data corresponding to the batch processing parameters of the curriculum to be updated by a second preset multiple to obtain the sliding interval data corresponding to the batch processing parameters of the curriculum to be updated.
The first preset multiple is an integer. The second preset multiple is an integer.
In an embodiment, the step of updating the user preference tag library according to the to-be-updated user preference tag data set by using the preset user batch processing parameter includes:
s31: acquiring a piece of user favorite label data from the user favorite label data set to be updated by adopting the preset user batch processing parameter to obtain the user favorite label data to be processed;
s32: adding favorite labels needing to be added in the to-be-processed user favorite label data into the user favorite label library according to the user identification corresponding to the to-be-processed user favorite label data;
s33: deleting favorite labels needing to be deleted in the to-be-processed user favorite label data from the user favorite label library according to the user identification corresponding to the to-be-processed user favorite label data;
s34: and repeatedly executing the step of acquiring one piece of user favorite tag data from the to-be-updated user favorite tag data set by adopting the preset user batch processing parameter to obtain the to-be-processed user favorite tag data until the update of all the user favorite tag data in the to-be-updated user favorite tag data set to the user favorite tag library is completed.
The embodiment realizes the updating of the user preference label library and provides a data basis for the subsequent generation of the similarity matrix; and the user preference label data is updated to the user preference label library, so that the repeated utilization is facilitated, and the efficiency of generating the similarity matrix is improved.
For step S31, a plurality of user favorite label data are extracted from the to-be-updated user favorite label data set in a sliding window manner according to the preset user batch processing parameter, one piece of user favorite label data is obtained from the extracted plurality of user favorite label data, and the obtained user favorite label data is used as the to-be-processed user favorite label data.
For step S32, searching in the user preference tag library by using the user identifier corresponding to the to-be-processed user preference tag data, and when the search is successful, using the user identifier searched in the user preference tag library as the to-be-added user identifier, otherwise, adding the to-be-processed user preference tag data and the user identifier corresponding to the to-be-processed user preference tag data into the user preference tag library; and adding the to-be-processed user preference label data into the user preference label data corresponding to the to-be-added user identifier in the user preference label library.
For S33, it is understood that the favorite label to be deleted may be all favorite labels in a user favorite label data, or may be a part of favorite labels in a user favorite label data.
For S34, steps S31 to S34 are repeated until the updating of the user favorites library by all the user favorites data in the user favorites data set to be updated is completed.
In an embodiment, the step of performing course recommendation according to the similarity matrix library and the to-be-recommended user identifier set carried in the course recommendation update request by using a preset recommendation rule to obtain a target course recommendation result corresponding to each user identifier of the to-be-recommended user identifier set includes:
s71: searching the user identification set to be recommended carried by the course recommendation updating request in the similarity matrix library to obtain a course and preference label similarity matrix corresponding to each user identification of the user identification set to be recommended;
s72: acquiring a preset similarity threshold;
s73: acquiring one user identifier from the user identifier set to be recommended as a user identifier to be recommended;
s74: finding out the similarity between the courses and the like labels which is greater than the preset similarity threshold from the similarity matrix between the courses and the like labels corresponding to the user identification to be recommended, and taking all the course names corresponding to the found similarity between the courses and the like labels as the target course recommendation result corresponding to the user identification to be recommended;
s75: and repeatedly executing the step of obtaining one user identifier from the user identifier set to be recommended as the user identifier to be recommended until the target course recommendation result corresponding to each user identifier in the user identifier set to be recommended is determined.
According to the course recommendation method and the system, course recommendation is carried out according to the preset similarity threshold, the similarity matrix library and the user identification set to be recommended carried by the course recommendation updating request, so that learning courses really interested by users are dynamically and deeply mined after course updating and/or user preference labels are updated, the timeliness of course recommendation is favorably improved, the accuracy of course recommendation is improved, and the enthusiasm of user learning is favorably mobilized.
For step S71, each user identifier in the user identifier set to be recommended carried by the course recommendation update request is respectively searched in the similarity matrix library, so as to obtain a course and preference label similarity matrix corresponding to each user identifier in the user identifier set to be recommended.
For S72, the preset similarity threshold input by the user may be obtained, the preset similarity threshold may also be obtained from a database, or the preset similarity threshold may also be sent by a third-party application system. It is to be understood that the preset similarity threshold may also be written in a program file implementing the present application.
For step S73, one user identifier is obtained from the set of user identifiers to be recommended, and the obtained user identifier is used as the user identifier to be recommended.
For step S74, finding out the similarity between the courses and the like labels larger than the preset similarity threshold from the similarity matrix between the courses and the like labels corresponding to the to-be-recommended user identifier, that is, the similarity of the preset recommendation rule is larger than the preset similarity threshold, which indicates that all the course names corresponding to the similarity between the courses and the like labels larger than the preset similarity threshold are close to the data of the to-be-recommended user identifier corresponding to the user preference label, and the courses corresponding to the similarity between the courses and the like labels larger than the preset similarity threshold are the mined learning courses really interested by the user corresponding to the to-be-recommended user identifier, therefore, all the course names corresponding to the similarity between the courses with the similarity greater than the preset similarity threshold and the like labels can be used as the target course recommendation result corresponding to the user identifier to be recommended.
For S75, repeating steps S73 to S75 until determining the target course recommendation result corresponding to each user id of the set of user ids to be recommended.
Referring to fig. 2, in an embodiment of the present application, there is provided a course recommending apparatus, including:
a request obtaining module 100, configured to obtain a data update request;
a course name segmentation library updating module 200, configured to, when the data updating request is a recommendation request after a course is updated, obtain a course name dataset to be updated, perform segmentation on each course name in the course name dataset to be updated by using preset course batch processing parameters, obtain a course name segmentation result corresponding to each course name corresponding to the course name dataset to be updated, and update a course name segmentation library according to the course name segmentation result corresponding to each course name corresponding to the course name dataset to be updated;
a user preference tag library updating module 300, configured to, when the data updating request is a recommendation request after updating a user preference tag, obtain a user preference tag data set to be updated, and update the user preference tag library according to the user preference tag data set to be updated by using a preset user batch processing parameter;
a target course name participle vector set determining module 400, configured to obtain the course name participle result from the course name participle library based on the data update request, to obtain a target course name participle result set, and perform word vector generation on each course name participle result in the target course name participle result set, to obtain a target course name participle vector set corresponding to the target course name participle result set;
a target user preference tag word vector set determining module 500, configured to obtain user preference tag data from the user preference tag library based on the data update request, to obtain a target user preference tag data set, and perform word vector generation on each user preference tag data in the target user preference tag data set, to obtain a target user preference tag word vector set corresponding to the target user preference tag data set;
a similarity matrix generation module 600, configured to perform similarity matrix generation according to the target course name word segmentation word vector set and the target user preference label word vector set to obtain a similarity matrix between the course to be updated and the preference label, and update a similarity matrix library according to the similarity matrix between the course to be updated and the preference label;
the course recommending module 700 is configured to obtain a course recommending and updating request based on the data updating request, and recommend a course according to the similarity matrix library and the to-be-recommended user identifier set carried in the course recommending and updating request by using a preset recommending rule to obtain a target course recommending result corresponding to each user identifier of the to-be-recommended user identifier set.
The method includes the steps of firstly, when a data updating request is a recommendation request after course updating, adopting preset course batch processing parameters to respectively segment each course name in a course name data set to be updated and update a course name segmentation library, when the data updating request is a recommendation request after user preference labels are updated, adopting the preset user batch processing parameters to update the user preference label library according to a user preference label data set to be updated, secondly, obtaining a course name segmentation result from the course name segmentation library based on the data updating request to generate a target course name segmentation word vector set, obtaining user preference label data from the user preference label library based on the data updating request to generate a word vector to obtain a target course name segmentation word vector set, and then, generating a similarity matrix according to the target course name segmentation word vector set and the target user preference label word vector set to obtain a course to be updated and a preference label vector set And finally, carrying out course recommendation according to the similarity matrix library and a user identification set carried by a course recommendation update request by adopting a preset recommendation rule to obtain a target course recommendation result corresponding to each user identification of the user identification set to be recommended, thereby dynamically and deeply mining the learning course really interested by the user after course update and/or user preference label update, being beneficial to improving the timeliness of course recommendation, improving the accuracy of course recommendation and mobilizing the enthusiasm of user learning.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for storing data such as course recommendation methods and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a course recommendation method. The course recommendation method comprises the following steps: acquiring a data updating request; when the data updating request is a recommendation request after course updating, acquiring a course name data set to be updated, performing word segmentation on each course name in the course name data set to be updated by adopting preset course batch processing parameters to obtain a course name word segmentation result corresponding to each course name corresponding to the course name data set to be updated, and updating a course name word segmentation library according to the course name word segmentation result corresponding to each course name corresponding to the course name data set to be updated; when the data updating request is a recommendation request after the user favorite tag is updated, acquiring a user favorite tag data set to be updated, and updating a user favorite tag library according to the user favorite tag data set to be updated by adopting preset user batch processing parameters; obtaining the course name word segmentation result from the course name word segmentation library based on the data updating request to obtain a target course name word segmentation result set, and respectively generating a word vector for each course name word segmentation result in the target course name word segmentation result set to obtain a target course name word segmentation vector set corresponding to the target course name word segmentation result set; acquiring user preference label data from the user preference label library based on the data updating request to obtain a target user preference label data set, and respectively performing word vector generation on each user preference label data in the target user preference label data set to obtain a target user preference label word vector set corresponding to the target user preference label data set; generating a similarity matrix according to the target course name word segmentation word vector set and the target user preference label word vector set to obtain a similarity matrix of the course to be updated and the preference label, and updating a similarity matrix library according to the similarity matrix of the course to be updated and the preference label; and acquiring a course recommendation updating request based on the data updating request, and recommending courses by adopting a preset recommendation rule according to the similarity matrix library and the user identification set to be recommended carried by the course recommendation updating request to obtain target course recommendation results corresponding to each user identification of the user identification set to be recommended.
The method includes the steps of firstly, when a data updating request is a recommendation request after course updating, adopting preset course batch processing parameters to respectively segment each course name in a course name data set to be updated and update a course name segmentation library, when the data updating request is a recommendation request after user preference labels are updated, adopting the preset user batch processing parameters to update the user preference label library according to a user preference label data set to be updated, secondly, obtaining a course name segmentation result from the course name segmentation library based on the data updating request to generate a target course name segmentation word vector set, obtaining user preference label data from the user preference label library based on the data updating request to generate a word vector to obtain a target course name segmentation word vector set, and then, generating a similarity matrix according to the target course name segmentation word vector set and the target user preference label word vector set to obtain a course to be updated and a preference label vector set And finally, carrying out course recommendation according to the similarity matrix library and a user identification set carried by a course recommendation update request by adopting a preset recommendation rule, and obtaining a target course recommendation result corresponding to each user identification of the user identification set to be recommended, so that learning courses really interested by the user are dynamically and deeply mined after course updating and/or user preference labels are updated, the timeliness of course recommendation is favorably improved, the accuracy of course recommendation is improved, and the enthusiasm of user learning is favorably mobilized.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing a course recommendation method, including the steps of: acquiring a data updating request; when the data updating request is a recommendation request after course updating, acquiring a course name data set to be updated, adopting preset course batch processing parameters to perform word segmentation on each course name in the course name data set to be updated respectively to obtain a course name word segmentation result corresponding to each course name corresponding to the course name data set to be updated, and updating a course name word segmentation library according to the course name word segmentation result corresponding to each course name corresponding to the course name data set to be updated; when the data updating request is a recommendation request after the user favorite tag is updated, acquiring a user favorite tag data set to be updated, and updating a user favorite tag library according to the user favorite tag data set to be updated by adopting preset user batch processing parameters; acquiring the course name word segmentation result from the course name word segmentation library based on the data updating request to obtain a target course name word segmentation result set, and performing word vector generation on each course name word segmentation result in the target course name word segmentation result set to obtain a target course name word segmentation vector set corresponding to the target course name word segmentation result set; acquiring user preference label data from the user preference label library based on the data updating request to obtain a target user preference label data set, and respectively performing word vector generation on each user preference label data in the target user preference label data set to obtain a target user preference label word vector set corresponding to the target user preference label data set; performing similarity matrix generation according to the target course name word segmentation word vector set and the target user preference label word vector set to obtain a similarity matrix of the course to be updated and the preference label, and updating a similarity matrix library according to the similarity matrix of the course to be updated and the preference label; and acquiring a course recommendation updating request based on the data updating request, and recommending courses by adopting a preset recommendation rule according to the similarity matrix library and the user identification set to be recommended carried by the course recommendation updating request to obtain target course recommendation results corresponding to the user identifications of the user identification set to be recommended.
The executed course recommending method comprises the steps of firstly adopting preset course batch processing parameters to respectively segment each course name in a course name data set to be updated and update a course name segmentation library when a data updating request is a recommending request after course updating, adopting preset user batch processing parameters to update a user preference label data set according to the user preference label data set to be updated when the data updating request is a recommending request after user preference labels are updated, secondly obtaining a course name segmentation result from the course name segmentation library based on the data updating request to generate a target course name segmentation word vector set, obtaining user preference label data from the user preference label library based on the data updating request to generate a word vector to obtain a target course name segmentation word vector set, and then generating a similarity matrix according to the target course name segmentation word vector set and the target user preference label word vector set to obtain a target course name segmentation word vector set And finally, carrying out course recommendation according to the preset recommendation rule according to the similarity matrix library and a user identification set carried by a course recommendation update request to obtain a target course recommendation result corresponding to each user identification of the user identification set to be recommended, so that learning courses really interested by the user are dynamically and deeply mined after course updating and/or user preference labels are updated, the timeliness of course recommendation is favorably improved, the accuracy of course recommendation is improved, and the enthusiasm of user learning is favorably mobilized.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), dual data rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (8)

1. A course recommendation method, the method comprising:
acquiring a data updating request;
when the data updating request is a recommended request after the course is updated, acquiring a course name data set to be updated;
acquiring a batch processing time length monitoring result and preset course batch processing parameters;
when the batch processing duration monitoring result is larger than the batch processing interval data of the preset course batch processing parameters, acquiring the number of CPU cores, the block interval data and a preset proportion;
multiplying the batch processing time length monitoring result by the preset proportion to obtain batch processing interval data corresponding to the batch processing parameters of the courses to be updated;
performing sliding window size calculation and sliding interval data calculation according to the batch processing interval data corresponding to the batch processing parameters of the curriculum to be updated to obtain the sliding window size and the sliding interval data corresponding to the batch processing parameters of the curriculum to be updated;
updating the preset course batch processing parameters according to the course batch processing parameters to be updated;
adopting the preset course batch processing parameters to perform word segmentation on each course name in the course name data set to be updated respectively to obtain a course name word segmentation result corresponding to each course name corresponding to the course name data set to be updated, and updating a course name word segmentation library according to the course name word segmentation result corresponding to each course name corresponding to the course name data set to be updated;
when the data updating request is a recommendation request after the user favorite tag is updated, acquiring a user favorite tag data set to be updated, and updating a user favorite tag library according to the user favorite tag data set to be updated by adopting preset user batch processing parameters;
obtaining the course name word segmentation result from the course name word segmentation library based on the data updating request to obtain a target course name word segmentation result set, and respectively generating a word vector for each course name word segmentation result in the target course name word segmentation result set to obtain a target course name word segmentation vector set corresponding to the target course name word segmentation result set;
acquiring user preference label data from the user preference label library based on the data updating request to obtain a target user preference label data set, and respectively performing word vector generation on each user preference label data in the target user preference label data set to obtain a target user preference label word vector set corresponding to the target user preference label data set;
performing similarity matrix generation according to the target course name word segmentation word vector set and the target user preference label word vector set to obtain a similarity matrix of the course to be updated and the preference label, and updating a similarity matrix library according to the similarity matrix of the course to be updated and the preference label;
and acquiring a course recommendation updating request based on the data updating request, and recommending courses by adopting a preset recommendation rule according to the similarity matrix library and the user identification set to be recommended carried by the course recommendation updating request to obtain target course recommendation results corresponding to the user identifications of the user identification set to be recommended.
2. The course recommendation method of claim 1, wherein said step of obtaining a data update request comprises:
acquiring a data updating notice sent by Kafka message middleware;
when the data updating notice is a course name updating notice, generating a recommendation request of the data updating request after course updating;
and when the data updating notification is a user favorite label updating notification, generating a recommendation request of the data updating request after the user favorite label is updated.
3. The course recommendation method as claimed in claim 1, wherein a step of segmenting each course name in the to-be-updated course name data set by using preset course batch processing parameters to obtain respective corresponding course name segmentation results of each course name corresponding to the to-be-updated course name data set, and updating the course name segmentation library according to the respective corresponding course name segmentation results of each course name corresponding to the to-be-updated course name data set comprises:
acquiring batch processing parameters of the preset courses;
when the course name data set to be updated comprises course name data needing to be deleted, deleting the course name word segmentation library according to the course name data needing to be deleted;
when the course name data set to be updated comprises the course name data to be newly added, the method is adopted to preset course batch processing parameters, and the course name data to be newly added is divided into words, so that the course name data to be newly added is obtained, the course name corresponds to each other, the course name division result is stored in the course name division library, and the course name data to be newly added is divided into words.
4. The course recommendation method as claimed in claim 1, wherein said step of updating said user preference tag library according to said to-be-updated user preference tag data set by using a preset user batch processing parameter comprises:
acquiring a piece of user favorite label data from the user favorite label data set to be updated by adopting the preset user batch processing parameter to obtain the user favorite label data to be processed;
adding favorite labels needing to be added in the to-be-processed user favorite label data into the user favorite label library according to the user identification corresponding to the to-be-processed user favorite label data;
deleting favorite labels needing to be deleted in the to-be-processed user favorite label data from the user favorite label library according to the user identification corresponding to the to-be-processed user favorite label data;
and repeatedly executing the step of acquiring one piece of user favorite label data from the user favorite label data set to be updated by adopting the preset user batch processing parameter to obtain the user favorite label data to be processed until the user favorite label library is updated by all the user favorite label data in the user favorite label data set to be updated.
5. The course recommendation method according to claim 1, wherein the step of performing course recommendation according to the similarity matrix library and the to-be-recommended user identifier set carried in the course recommendation update request by using a preset recommendation rule to obtain a target course recommendation result corresponding to each user identifier of the to-be-recommended user identifier set includes:
searching the user identification set to be recommended carried by the course recommendation updating request in the similarity matrix library to obtain a course and preference label similarity matrix corresponding to each user identification of the user identification set to be recommended;
acquiring a preset similarity threshold;
acquiring one user identifier from the user identifier set to be recommended as a user identifier to be recommended;
finding out the similarity between the courses and the like labels which is greater than the preset similarity threshold from the similarity matrix between the courses and the like labels corresponding to the user identification to be recommended, and taking all the course names corresponding to the found similarity between the courses and the like labels as the target course recommendation result corresponding to the user identification to be recommended;
and repeatedly executing the step of obtaining one user identifier from the user identifier set to be recommended as the user identifier to be recommended until the target course recommendation result corresponding to each user identifier in the user identifier set to be recommended is determined.
6. A course recommending apparatus, said apparatus comprising:
the request acquisition module is used for acquiring a data updating request;
the monitoring result and processing parameter acquisition module is used for acquiring a batch processing duration monitoring result and preset course batch processing parameters;
the to-be-updated course batch processing parameter determining module is used for acquiring the number of CPU cores, the block interval data and the preset proportion when the batch processing duration monitoring result is greater than the batch processing interval data of the preset course batch processing parameters;
multiplying the batch processing time length monitoring result by the preset proportion to obtain batch processing interval data corresponding to the batch processing parameters of the courses to be updated;
performing sliding window size calculation and sliding interval data calculation according to the batch processing interval data corresponding to the batch processing parameters of the curriculum to be updated to obtain the sliding window size and the sliding interval data corresponding to the batch processing parameters of the curriculum to be updated;
the updating module is used for updating the preset course batch processing parameters according to the course batch processing parameters to be updated;
the course name segmentation library updating module is used for segmenting each course name in a course name data set to be updated by adopting the preset course batch processing parameters to obtain a course name segmentation result corresponding to each course name corresponding to the course name data set to be updated, and updating the course name segmentation library according to the course name segmentation result corresponding to each course name corresponding to the course name data set to be updated;
the user preference tag library updating module is used for acquiring a user preference tag data set to be updated when the data updating request is a recommendation request after the user preference tag is updated, and updating the user preference tag library according to the user preference tag data set to be updated by adopting a preset user batch processing parameter;
a target course name participle word vector set determining module, configured to obtain the course name participle result from the course name participle library based on the data update request, to obtain a target course name participle result set, and perform word vector generation on each course name participle result in the target course name participle result set, to obtain a target course name participle word vector set corresponding to the target course name participle result set;
a target user preference tag word vector set determining module, configured to obtain user preference tag data from the user preference tag library based on the data update request, to obtain a target user preference tag data set, and perform word vector generation on each user preference tag data in the target user preference tag data set, to obtain a target user preference tag word vector set corresponding to the target user preference tag data set;
the similarity matrix generation module is used for generating a similarity matrix according to the target course name word segmentation word vector set and the target user preference label word vector set to obtain a similarity matrix of the courses to be updated and preference labels, and updating a similarity matrix library according to the similarity matrix of the courses to be updated and the preference labels;
and the course recommending module is used for acquiring a course recommending and updating request based on the data updating request, recommending courses by adopting a preset recommending rule according to the similarity matrix library and the user identification set to be recommended carried by the course recommending and updating request, and obtaining target course recommending results corresponding to each user identification of the user identification set to be recommended.
7. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program performs the steps of the method according to any of claims 1 to 5.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202011609487.5A 2020-12-30 2020-12-30 Course recommendation method, device, equipment and storage medium Active CN112732892B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011609487.5A CN112732892B (en) 2020-12-30 2020-12-30 Course recommendation method, device, equipment and storage medium
PCT/CN2021/091727 WO2022142043A1 (en) 2020-12-30 2021-04-30 Course recommendation method and apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011609487.5A CN112732892B (en) 2020-12-30 2020-12-30 Course recommendation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112732892A CN112732892A (en) 2021-04-30
CN112732892B true CN112732892B (en) 2022-09-20

Family

ID=75610873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011609487.5A Active CN112732892B (en) 2020-12-30 2020-12-30 Course recommendation method, device, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN112732892B (en)
WO (1) WO2022142043A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656705B (en) * 2021-08-31 2024-02-20 中国平安财产保险股份有限公司 Course recommendation method, device, equipment and storage medium based on artificial intelligence
CN113656703B (en) * 2021-08-31 2023-05-30 中国平安财产保险股份有限公司 Intelligent recommendation method, device, equipment and storage medium based on new online courses
CN113722591B (en) * 2021-08-31 2024-02-23 南京邮电大学 Online course recommendation method
CN114117050B (en) * 2021-11-30 2022-08-05 济南农村商业银行股份有限公司 Full-automatic accounting flow popup window processing method, device and system
CN115344787B (en) * 2022-08-23 2023-07-04 华南师范大学 Multi-granularity recommendation method, system, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109446412A (en) * 2018-09-25 2019-03-08 中国平安人寿保险股份有限公司 Product data method for pushing, device, equipment and medium based on web page tag
CN112052396A (en) * 2020-09-28 2020-12-08 中国平安人寿保险股份有限公司 Course matching method, system, computer equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729360A (en) * 2012-10-12 2014-04-16 腾讯科技(深圳)有限公司 Interest label recommendation method and system
CN105183803A (en) * 2015-08-25 2015-12-23 天津大学 Personalized search method and search apparatus thereof in social network platform
CN107862553B (en) * 2017-11-15 2020-03-17 平安科技(深圳)有限公司 Advertisement real-time recommendation method and device, terminal equipment and storage medium
CN107844586B (en) * 2017-11-16 2022-05-06 百度在线网络技术(北京)有限公司 News recommendation method and device
CN108510307A (en) * 2018-02-25 2018-09-07 心触动(武汉)科技有限公司 A kind of course recommendation method and system
US20200234606A1 (en) * 2019-01-22 2020-07-23 International Business Machines Corporation Personalized educational planning based on user learning profile
CN111428138A (en) * 2020-03-26 2020-07-17 中国建设银行股份有限公司 Course recommendation method, system, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109446412A (en) * 2018-09-25 2019-03-08 中国平安人寿保险股份有限公司 Product data method for pushing, device, equipment and medium based on web page tag
CN112052396A (en) * 2020-09-28 2020-12-08 中国平安人寿保险股份有限公司 Course matching method, system, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112732892A (en) 2021-04-30
WO2022142043A1 (en) 2022-07-07

Similar Documents

Publication Publication Date Title
CN112732892B (en) Course recommendation method, device, equipment and storage medium
CN110825966B (en) Information recommendation method and device, recommendation server and storage medium
CN109086348B (en) Hyperlink processing method and device and storage medium
CN111797318A (en) Information recommendation method, device, equipment and storage medium
CN111325322A (en) Deep learning method, system, server and storage medium based on privacy protection
CN113326379A (en) Text classification prediction method, device, equipment and storage medium
CN112685475A (en) Report query method and device, computer equipment and storage medium
CN114416984A (en) Text classification method, device and equipment based on artificial intelligence and storage medium
CN110609618A (en) Man-machine conversation method and device, computer equipment and storage medium
CN114492601A (en) Resource classification model training method and device, electronic equipment and storage medium
CN113656705B (en) Course recommendation method, device, equipment and storage medium based on artificial intelligence
CN112766485A (en) Training method, device, equipment and medium for named entity model
CN111026912A (en) Collaborative recommendation method and device based on IPTV, computer equipment and storage medium
CN116226560A (en) Short-link generation method and device
CN108460116B (en) Search method, search device, computer equipment, storage medium and search system
CN114003813A (en) Client grouping method, device, equipment and storage medium
CN113472915B (en) Domain name resolution method, device, equipment and storage medium
CN114861818A (en) Main data matching method, device, equipment and storage medium based on artificial intelligence
CN115640476A (en) Site column management method, terminal and computer readable storage medium
CN114723986A (en) Text image matching method, device, equipment and storage medium
CN114048367A (en) Metadata information query method, device, equipment and storage medium
CN112800181A (en) Text retrieval method and device, computer equipment and storage medium
CN112989788A (en) Method, device, equipment and medium for extracting relation triples
CN111859191A (en) GIS service aggregation method, device, computer equipment and storage medium
CN112148724A (en) Equipment identification processing method and system, computer equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant