Topic recommendation method and device, storage medium and equipment
By comprehensively considering the text and graphic information of mixed graphic questions, and using large language models to calculate the scores of candidate questions, the problem of insufficient recommendation accuracy in the existing technology is solved, and students' question-writing effect and learning experience are improved.
Patent Information
- Application Number
- CN202510515509.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-05
AI Technical Summary
The existing method of recommendation for questions is mainly based on text information, ignoring the graphic information, resulting in insufficient accuracy and relevance of recommendations for mixed questions of graphic and text, affecting students' question-writing effect and learning experience.
By extracting the question text information and graphic information practiced by the target user, using a large language model to calculate the text and graphic information weights of the candidate topics, comprehensively calculate the scores of the candidate topics, and recommend the questions whose scores meet the preset conditions.
It improves the accuracy and relevance of recommendations for mixed graphic questions, and improves students' problem-writing and learning experience.
Smart Images

Figure CN120429454A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing technology, and in particular to a topic recommendation method, apparatus, storage medium, and device. Background Art
[0002] Exercises are a crucial learning resource in the teaching process. By doing a large number of exercises, students can continuously consolidate, review, supplement, and test their knowledge, thus strengthening their grasp of each key point. Furthermore, to facilitate more effective learning, similar exercises are often recommended for students to practice based on their current exercises, aiming to strengthen weaknesses and consolidate strengths.
[0003] Currently, existing question recommendation methods primarily provide personalized recommendations based on the textual information of the question. This works well for questions containing only text. However, for many mixed text and graphic questions that also include graphical information, existing recommendation methods overlook the important role of graphical information in these mixed text and graphic questions. This results in inaccurate and inappropriate recommendations, which in turn affects students' practice effectiveness and reduces their learning experience. Summary of the Invention
[0004] The main purpose of the embodiments of the present application is to provide a question recommendation method, device, storage medium and equipment, which can more comprehensively understand the content and meaning of the question while comprehensively considering the question text information and question image information of the mixed text and picture questions, so as to recommend questions with higher accuracy and relevance to students (especially mixed text and picture questions), thereby improving students' question-answering results and learning experience.
[0005] The present application provides a method for recommending a topic, including:
[0006] Obtaining a target topic for a target user to practice; and extracting text information and graphic information of the target topic;
[0007] Using the text information and / or graphic information of the target topic, determine N candidate topics similar to the target topic; where N is a positive integer greater than 0;
[0008] Generating prompt instructions using the N candidate questions and inputting them into a large language model to obtain a text information weight and a graphic information weight of each candidate question in the N candidate questions;
[0009] The score of each candidate topic among the N candidate topics is calculated using the text information weight and the graphic information weight of each candidate topic; and the candidate topics whose scores meet the preset conditions are recommended to the target user.
[0010] In one possible implementation, extracting the text information and graphic information of the target topic includes:
[0011] The title information of the target title is processed by using a typesetting engine to extract text content as the text information of the target title; and the graphic content of the title information is cropped to obtain the graphic information of the target title.
[0012] In one possible implementation, determining N candidate topics similar to the target topic using the text information and / or graphic information of the target topic includes:
[0013] Calculate the vector similarity between the text information of the target topic and the text information of each topic in the pre-built topic text vector database, and based on the calculation results, screen out N topics that meet the preset text vector similarity conditions as N candidate topics similar to the target topic.
[0014] In one possible implementation, determining N candidate topics similar to the target topic using the text information and / or graphic information of the target topic includes:
[0015] Calculate the vector similarity between the graphic information of the target question and the graphic information of each question in a pre-built question graphic vector database, and based on the calculation results, screen out N questions that meet the preset graphic vector similarity conditions as N candidate questions similar to the target question.
[0016] In one possible implementation, determining N candidate topics similar to the target topic using the text information and / or graphic information of the target topic includes:
[0017] Calculating the vector similarity between the text information of the target question and the text information of each question in a pre-built question text vector database, and screening out M questions that meet a preset text vector similarity condition based on the calculation result; wherein M is a positive integer greater than 0;
[0018] Calculating vector similarity between the graphic information of the target question and the graphic information of each question in a pre-built question graphic vector database, and selecting K questions that meet a preset graphic vector similarity condition based on the calculation result; K is a positive integer greater than 0;
[0019] N identical topics are screened out from the M topics and the K topics as N candidate topics similar to the target topic.
[0020] In one possible implementation, calculating the score of each candidate topic by using the text information weight and the graphic information weight of each candidate topic among the N candidate topics includes:
[0021] Determining a text score for each candidate topic according to a vector similarity between the text information of each candidate topic in the N candidate topics and the text information of the target topic;
[0022] Determining a graphic score for each candidate question according to a vector similarity between the graphic information of each candidate question in the N candidate questions and the graphic information of the target question;
[0023] The text information weight and the graphic information weight of each candidate topic in the N candidate topics are used to perform a weighted sum calculation on the text score and the graphic score of each candidate topic to obtain a comprehensive score for each candidate topic.
[0024] In one possible implementation, recommending candidate questions whose scores meet a preset condition to the target user includes:
[0025] The highest comprehensive score is screened out from the comprehensive scores of each candidate topic, and the candidate topic corresponding to the highest comprehensive score is recommended to the target user.
[0026] The present application also provides a topic recommendation device, including:
[0027] An extraction unit, configured to obtain a target topic for a target user to practice; and extract text information and graphic information of the target topic;
[0028] a determining unit, configured to determine N candidate topics similar to the target topic using the text information and / or graphic information of the target topic, wherein N is a positive integer greater than 0;
[0029] An input unit, configured to generate a prompt instruction using the N candidate questions, input the prompt instruction into the large language model, and obtain a text information weight and a graphic information weight of each candidate question in the N candidate questions;
[0030] The recommendation unit is configured to calculate a score for each of the N candidate topics using the text information weight and the graphic information weight of each candidate topic; and recommend to the target user candidate topics whose scores meet preset conditions.
[0031] In a possible implementation, the extraction unit is specifically configured to:
[0032] The title information of the target title is processed by using a typesetting engine to extract text content as the text information of the target title; and the graphic content of the title information is cropped to obtain the graphic information of the target title.
[0033] In a possible implementation, the determining unit is specifically configured to:
[0034] Calculate the vector similarity between the text information of the target topic and the text information of each topic in the pre-built topic text vector database, and based on the calculation results, screen out N topics that meet the preset text vector similarity conditions as N candidate topics similar to the target topic.
[0035] In a possible implementation, the determining unit is specifically configured to:
[0036] Calculate the vector similarity between the graphic information of the target question and the graphic information of each question in a pre-built question graphic vector database, and based on the calculation results, screen out N questions that meet the preset graphic vector similarity conditions as N candidate questions similar to the target question.
[0037] In a possible implementation, the determining unit includes:
[0038] A first calculation subunit is configured to calculate vector similarities between the text information of the target question and the text information of each question in a pre-constructed question text vector database, and select M questions that meet a preset text vector similarity condition based on the calculation results; M is a positive integer greater than 0;
[0039] a second calculation subunit, configured to calculate vector similarity between the graphic information of the target question and the graphic information of each question in a pre-built question graphic vector database, and select K questions that meet a preset graphic vector similarity condition based on the calculation result; wherein K is a positive integer greater than 0;
[0040] The screening subunit is configured to screen out N identical topics from the M topics and the K topics as N candidate topics similar to the target topic.
[0041] In a possible implementation, the recommendation unit includes:
[0042] A first determining subunit is configured to determine a text score of each candidate topic according to a vector similarity between the text information of each candidate topic in the N candidate topics and the text information of the target topic;
[0043] a second determining subunit, configured to determine a graphic score for each candidate question in the N candidate questions based on a vector similarity between the graphic information of each candidate question and the graphic information of the target question;
[0044] The third calculation subunit is used to use the text information weight and graphic information weight of each candidate topic in the N candidate topics to perform weighted sum calculation on the text score and graphic score of each candidate topic to obtain the comprehensive score of each candidate topic.
[0045] In one possible implementation, the recommendation unit is specifically configured to:
[0046] The highest comprehensive score is screened out from the comprehensive scores of each candidate topic, and the candidate topic corresponding to the highest comprehensive score is recommended to the target user.
[0047] The embodiment of the present application also provides a topic recommendation device, comprising: a processor, a memory, and a system bus;
[0048] The processor and the memory are connected via the system bus;
[0049] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any one of the implementations of the above-mentioned question recommendation method.
[0050] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions. When the instructions are executed on a terminal device, the terminal device executes any one of the implementations of the above-mentioned topic recommendation method.
[0051] An embodiment of the present application further provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute any one of the implementations of the above-mentioned topic recommendation method.
[0052] The embodiments of the present application provide a method, apparatus, storage medium, and device for recommending a topic, which first obtains a target topic for a target user to practice; extracts text information and graphic information of the target topic; and then uses the text information and / or graphic information of the target topic to determine N candidate topics similar to the target topic; wherein N is a positive integer greater than 0; then, uses the N candidate topics to generate prompt instructions, which are input into a large language model (LLM) to obtain a text information weight and a graphic information weight for each of the N candidate topics; and then uses the text information weight and the graphic information weight for each of the N candidate topics to calculate a score for each candidate topic; and recommends candidate topics whose scores meet preset conditions to the target user.
[0053] It can be seen that since this application fully considers the text information and graphic information of the target questions practiced by the target users (such as the questions the target users are currently doing, etc.) when recommending questions to the target users (such as students), it can recommend questions with higher accuracy and relevance (especially mixed text and picture questions) to the target users based on a more comprehensive understanding of the content and meaning of the target questions, thereby improving the question-solving effect and learning experience of the target users (such as students). BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0055] Figure 1 A flowchart of a topic recommendation method provided in an embodiment of the present application;
[0056] Figure 2 An example diagram of the target topic provided in the embodiment of the present application;
[0057] Figure 3 This is one of the example diagrams of the graphic information of the target topic provided in the embodiment of the present application;
[0058] Figure 4 This is a second example of graphic information of a target topic provided in an embodiment of the present application;
[0059] Figure 5 This is a third example of graphic information of a target topic provided in an embodiment of the present application;
[0060] Figure 6 This is a fourth example of graphic information of a target topic provided in an embodiment of the present application;
[0061] Figure 7 This is a fifth example of graphic information of a target topic provided in an embodiment of the present application;
[0062] Figure 8 Figure 6 of the example of graphic information of the target topic provided in the embodiment of the present application;
[0063] Figure 9 A schematic diagram of the composition of a topic recommendation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] In recent years, artificial intelligence technology has flourished and has been widely used in the field of education, helping to reduce teachers' after-school workload and improve students' learning efficiency.
[0065] During the learning process, students need more practice with similar questions for questions they get wrong or don't fully understand. Teachers often provide similar questions for students to practice. Therefore, recommending similar questions from a large database of questions categorized by knowledge points based on the questions students practice is a critical requirement. Optimizing this recommendation strategy has become a key technology.
[0066] At present, the existing question recommendation methods mainly provide personalized recommendations to students based on the text information of the questions. For example, based on the text similarity between the questions, similar questions can be selected for recommendation for the questions the students are currently doing. However, since this method only considers text similarity, the recommendation effect is less ideal for questions that only contain text information.
[0067] Existing questions often include not only text but also some graphical information to supplement the textual description. While these information-rich, mixed-text and graphic questions can more comprehensively assess students' knowledge, they also pose challenges for question recommendations, especially for math problems involving geometric figures, equations, and curves, as these graphical elements are crucial components of mixed-text and graphic questions. If existing methods based on textual information are still used for recommendation, the crucial role of graphical information in these mixed-text and graphic questions will be overlooked, resulting in inaccurate and inappropriate recommendations, which in turn affects students' effectiveness in solving the questions and diminishes their learning experience.
[0068] To address the above-mentioned shortcomings, the present application provides a topic recommendation method, which first obtains a target topic for a target user to practice; extracts the text information and graphic information of the target topic, and then uses the text information and / or graphic information of the target topic to determine N candidate topics similar to the target topic; wherein N is a positive integer greater than 0; then, uses the N candidate topics to generate prompt instructions, which are input into a large language model to obtain the text information weight and graphic information weight of each candidate topic in the N candidate topics; and then uses the text information weight and graphic information weight of each candidate topic in the N candidate topics to calculate the score of each candidate topic; and recommends to the target user candidate topics whose scores meet preset conditions.
[0069] It can be seen that since this application fully considers the text information and graphic information of the target questions practiced by the target users (such as the questions the target users are currently doing, etc.) when recommending questions to the target users (such as students), it can recommend questions with higher accuracy and relevance (especially mixed text and picture questions) to the target users based on a more comprehensive understanding of the content and meaning of the target questions, thereby improving the question-solving effect and learning experience of the target users (such as students).
[0070] First embodiment
[0071] See also Figure 1 , is a flowchart of a topic recommendation method provided in this embodiment, the method comprising the following steps:
[0072] S101: Obtain a target topic for a target user to practice; and extract text information and graphic information of the target topic.
[0073] In this embodiment, any user who adopts this embodiment to implement the recommendation of learning questions is defined as a target user, and the questions that the target user has practiced (such as the ones he is currently doing) are defined as target questions. In addition, this embodiment does not limit the language of the target questions. For example, the target questions can be Chinese questions or English questions. This embodiment also does not limit the field to which the target questions belong. For example, the target questions can be high school math questions or junior high school chemistry questions. This embodiment also does not limit the type of target questions. For example, the target questions can be questions that only contain text information or mixed text and image information. This embodiment also does not limit the source of the target questions. For example, the target questions can come from pictures of the questions that the target user has practiced (such as the ones he is currently doing) taken by any shooting device.
[0074] Among them, this application does not limit the method of obtaining the picture containing the target title. According to the actual situation, you can choose a suitable shooting device to shoot a picture containing the target title, such as using a mobile phone to shoot the target user doing something like Figure 2 The image of the math problem shown. Furthermore, this application does not limit the type of the captured image containing the target problem. For example, it can be a color image composed of the three primary colors of red (R), green (G), and blue (B), or a grayscale image. Furthermore, this embodiment does not limit its resolution. For example, it can be a 720*480 RGB image or a high-resolution 1920*1280 RGB image.
[0075] In order to recommend more accurate and relevant questions to the target user, so as to improve the target user's practice effect and learning experience, this application obtains the target questions for the target user to practice (such as Figure 2 After the math problem shown in FIG, the target problem (such as Figure 2 The question information contained in the math question shown in FIG. 1 is processed to extract the text information and graphic information of the target question to perform the subsequent step S102.
[0076] Specifically, one optional implementation method is to obtain the target questions for the target user to practice (such as Figure 2 After obtaining the math problem shown in the figure, a typesetting engine (the specific structure is not limited and can be selected according to actual conditions and experience, such as a PDF processing library, a Word document parsing tool, or an HTML / CSS rendering engine, etc.) can be used to process the question information of the target question, extract the text content as the text information of the target question; and crop the graphic content of the question information to obtain the graphic information of the target question.
[0077] In this implementation, a suitable typesetting engine is first selected to parse the document, and then text and graphic information are extracted based on the document structure. Text information can be directly obtained from the parsing results, such as by using existing or future optical character recognition (OCR) tools to recognize the text content in the target title. Graphic information can first be identified by identifying the graphic position (e.g., coordinates), and then appropriately cropping the graphic based on the graphic position (e.g., coordinates) (the specific cropping range and method are not limited) to obtain the graphic information of the target title.
[0078] For example: Take the target topic as Figure 2Taking the shown math problem as an example, using a typesetting engine to process the problem information of the target problem, the text information of the target problem extracted can be, but is not limited to: 14174 10 - 1021③15 - 7 = ④16 - 8 = 5106 10 - 3 + 2⑤11 - 9 = 11 - 8 = 1 1011012. And the graphic information of the target problem extracted can include, but is not limited to, 6 parts of image information, respectively as Figure 3 , Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8 shown.
[0079] S102: Determine N candidate problems similar to the target problem by using the text information and / or graphic information of the target problem; where N is a positive integer greater than 0.
[0080] In this embodiment, after extracting the text information and graphic information of the target problem through step S101, further, the text information and / or graphic information of the target problem can be used to determine N (the specific value is not limited) candidate problems similar to the target problem (such as belonging to the same knowledge point, etc.) from a large number of existing problems (such as problems in a question bank stored in advance classified by different fields and each knowledge point) for performing the subsequent step S103.
[0081] Specifically, an optional implementation method is that after extracting the text information of the target problem, further, the vector similarity between the text information of the target problem and the text information of each problem in the pre - constructed problem text vector database can be calculated, and according to the calculation result, N problems that meet the preset text vector similarity condition (the specific content is not limited and can be set according to the actual situation and empirical values) are selected as N candidate problems similar to the target problem.
[0082] In this implementation method, in order to improve the problem recommendation effect, a problem text vector database is pre - constructed, and the construction method and the content included are not limited. Specifically, a large number of existing problems in each field and each subject (especially text - image mixed problems) can be obtained first, then the text information content of each existing problem is extracted by using text content extraction methods such as a typesetting engine, and then based on text vector generation methods such as a text embedding model, text vectors corresponding to the text information content of each existing problem are generated. Furthermore, the text information content of each existing problem and its corresponding text vector can be used to form a problem text vector database (the specific database format is not limited). Among them, the database can include, but is not limited to, the unique number corresponding to each problem, the text information content, and its corresponding text vector, etc.
[0083] As for the text information of the target question, in order to improve the matching accuracy, it can be preprocessed by cleaning and removing noise characters, special symbols (such as some common emoji expressions), and then the preprocessed text information can be segmented. Then, a pre-trained word vector model (such as Word2Vec) is used to convert the segmented words into low-dimensional vector representations. Then, the low-dimensional vector representations corresponding to each segmentation are spliced together, and the entire vector representation obtained after splicing is used as the text vector corresponding to the text information of the target question.
[0084] On this basis, using existing or future text vector similarity calculation methods, the vector similarity between the text vector corresponding to the text information of the target question and the text vector corresponding to the text information of each question in the pre-built question text vector database is calculated, and the obtained vector similarities are sorted from high to low, and then the N questions corresponding to the top N (such as 50) similarities are selected as the N candidate questions similar to the target question.
[0085] For example: still taking the target title as Figure 2 Taking the math problem shown in the figure as an example, after using the typesetting engine to extract the text information of the target problem (i.e., 14174 10-1021③15-7=④16-8=5106 10-3+2⑤11-9=11-8=1 1011012), by calculating the vector similarity between the text vector corresponding to the text information of the target problem and the text vector corresponding to the text information of each problem in the pre-built problem text vector database, and sorting the obtained vector similarities from high to low, the two candidate problems corresponding to the top two similarities can be screened out, as shown in Table 1 below:
[0086]
[0087] Table 1
[0088] Alternatively, another optional implementation method is that after extracting the graphic information of the target question, the vector similarity between the graphic information of the target question and the graphic information of each question in a pre-built question graphic vector database can be further calculated, and based on the calculation results, N questions that meet the preset graphic vector similarity conditions (the specific content is not limited and can be set according to actual conditions and experience values) are screened out as N candidate questions similar to the target question.
[0089] In this implementation, in order to improve the effect of topic recommendation, a topic graphic vector database is pre-built, and the construction method and the included content are not limited. Specifically, a large number of existing topics in various fields and disciplines (especially mixed text and picture topics) can be obtained first, and then the graphic content extraction method such as typesetting engine can be used to extract the graphic information content of each existing topic. Specifically, it can be a sub-picture set included in each existing topic (which can be understood as Figures 3 to 8 Then, based on a graphic vector generation method such as a graphic vector model, a graphic vector corresponding to each image in the sub-graph set included in each existing question is generated. The average vector of the sub-graphs corresponding to the sub-graph set included in each existing question is then calculated as the graphic vector of the graphic information of the corresponding question. The graphic information content of each existing question and its corresponding graphic vector can then be used to construct a question graphic vector database (the specific database format is not limited). This database may include, but is not limited to, the unique number corresponding to each question, the graphic information content, and its corresponding graphic vector.
[0090] On this basis, for the graphic information of the target question, in order to improve the matching accuracy, we can first use existing or future image vector calculation methods to extract the graphic vector corresponding to the graphic information of the target question. For example, we can use the Contrastive Language-Image Pretraining (CLIP) model to convert the graphic information of the target question into an average picture vector, wherein the CLIP model can effectively extract the semantic features of the image and provide a basis for subsequent similarity calculation. Then, we use existing or future graphic vector similarity calculation methods to calculate the vector similarity between the text vector corresponding to the graphic information of the target question and the graphic vector corresponding to the graphic information of each question in the pre-built question graphic vector database, and sort the obtained vector similarities from high to low, and then select the N questions corresponding to the top N (such as 100) similarities as the N candidate questions similar to the target question.
[0091] Alternatively, another optional implementation method is to further calculate the vector similarity between the target question's text information and graphic information after extracting it, and then screen out M (the specific value is not limited) questions that meet a preset text vector similarity condition (the specific content is not limited and can be set according to actual conditions and experience) based on the calculation results. The specific calculation method will not be repeated here.
[0092] Next, the vector similarity between the target question's graphic information and the graphic information of each question in the pre-built question graphic vector database is calculated. Based on the calculation results, K (the specific value is not limited) questions that meet the preset graphic vector similarity conditions (the specific content is not limited and can be set based on actual conditions and experience) are selected. The specific calculation method is not detailed here.
[0093] Then, N identical topics can be screened out from the M topics and the K topics (ie, the M topics and the K topics are taken as a union, and the N identical topics are screened out) as N candidate topics similar to the target topic.
[0094] S103: Generate prompt instructions using the N candidate questions, input them into the large language model, and obtain the text information weight and graphic information weight of each candidate question in the N candidate questions.
[0095] In this embodiment, after determining N candidate questions similar to the target question through step S102, each of the N candidate questions is further integrated into a prompt instruction (prompt), and the generated prompt instruction (prompt) is input into the large language model to conduct an in-depth semantic understanding of each candidate question, including but not limited to analyzing the knowledge points, logical relationships, and problem-solving ideas involved in the candidate question. In this way, based on the large language model, the text information weight (expressed as G) and graphic information weight (expressed as I) of each candidate question in the N candidate questions output by the model can be obtained immediately, which is used to execute the subsequent step S104. Among them, the sum of the text information weight (G) and graphic information weight (I) of each candidate question is 1.
[0096] For example, the prompt generated using the candidate questions may be as follows:
[0097] Based on your understanding of this question, please evaluate the weight of text and graphics respectively, with the total being 1, and give your reasons. The output should be in JSON format.
[0098] Sample output:
[0099] {
[0100] "text_weight":0.6,
[0101] "image_weight":0.4,
[0102] "reason":""
[0103] }
[0104] illustrate:
[0105] text_weight: The weight of the text in the title, ranging from 0 to 1.
[0106] image_weight: The weight of the image in the title, ranging from 0 to 1.
[0107] Reason: Explain the reasons for the weight distribution, explaining why the weights of text and images are distributed in this way.
[0108] If the title contains only text and no other graphics, text_weight=1
[0109] If the title contains only graphics and no other text, image_weight=1"
[0110] S104: Calculate the score of each candidate topic using the text information weight and graphic information weight of each candidate topic among the N candidate topics; and recommend candidate topics whose scores meet preset conditions to the target user.
[0111] In this embodiment, after obtaining the text information weight (G) and graphic information weight (I) of each candidate question among the N candidate questions through step S103, the text information weight (G) and graphic information weight (I) of each candidate question among the N candidate questions can be further used to calculate the score of each candidate question, and recommend candidate questions whose scores meet preset conditions (the specific content is not limited and can be set according to actual conditions and experience values, such as setting it to the highest score, etc.) to the target user. For example, after the target user finishes the target question, the pop-up window can be used to display the candidate questions whose scores meet the preset conditions to the target user for practice, so that questions with higher accuracy and relevance to the target question (such as the candidate questions with the highest scores) can be recommended to the target user, thereby improving the target user's question-answering effect and learning experience.
[0112] Specifically, an optional implementation method is to first determine the text score of each candidate question based on the vector similarity between the text information of each candidate question in N candidate questions and the text information of the target question. For example, the vector similarity between the text information of the candidate question and the text information of the target question can be directly used as the text score of the corresponding candidate question (as shown in Table 1 above), or a proportional score conversion can be performed based on the vector similarity between the text information of the candidate question and the text information of the target question, etc. For example, the similarity value between 0 and 1 can be proportionally converted into a text score of 0 to 1 (or 0 to 100), etc. The specific method of determining the text score is not limited.
[0113] Then, similarly, the graphic score of each candidate question can be determined based on the vector similarity between the graphic information of each candidate question in the N candidate questions and the graphic information of the target question. For example, the vector similarity between the graphic information of the candidate question and the graphic information of the target question can be directly used as the graphic score of the corresponding candidate question, or a proportional score conversion can be performed based on the vector similarity between the graphic information of the candidate question and the graphic information of the target question, such as the similarity value between 0 and 1 can be proportionally converted into a graphic score of 0 to 1 (or 0 to 100), etc. The specific method of determining the graphic score is not limited. However, it is necessary to ensure that the text score and graphic score of each candidate question are of the same dimension (such as scores between 0 and 1, etc.).
[0114] Next, the text information weight (G) and graphic information weight (I) of each candidate question among the N candidate questions can be used to perform a weighted sum calculation on the text score and graphic score of each candidate question to obtain the comprehensive score of each candidate question. The specific calculation formula is as follows:
[0115] Comprehensive score = text score * text information weight G + graphic score * graphic information weight I
[0116] Furthermore, the N candidate topics are sorted from high to low according to the comprehensive scores, and the highest comprehensive score is selected to recommend the candidate topic corresponding to the highest comprehensive score to the target user.
[0117] For example: still taking the target title as Figure 2 Taking the math problem shown in the figure as an example, after determining the two candidate problems shown in Table 1 above, the text scores and text information weights (G) of the two candidate problems can be further determined as shown in Table 2 below:
[0118]
[0119] Table 2
[0120] Or, still taking the target topic as Figure 2 Taking the math problem shown in FIG. 1 as an example, two candidate problems are determined by using the graphic information of the target problem through the above steps, and the graphic scores and graphic information weights (I) of the two candidate problems are further determined as shown in Table 3 below:
[0121]
[0122] Table 3
[0123] If we take the union of the topics in Table 2 and Table 3, we can filter out one identical topic as the only candidate topic similar to the target topic, which is the topic numbered 39115 ranked first. Therefore, through the above-mentioned comprehensive score calculation formula (i.e., comprehensive score = text score * text information weight G + graphic score * graphic information weight I), the comprehensive score of the candidate topic can be calculated. Since there is only this one candidate topic, it can be recommended to the target user. However, it can be understood that this example is relatively simple. In actual applications, more than one candidate topic similar to the target topic will often be filtered out, so the comprehensive scores corresponding to all candidate topics similar to the target topic can be calculated, and then the candidate topic ranked first (i.e., the highest) in the comprehensive score can be selected as the recommended topic to be displayed to the target user.
[0124] Alternatively, the text information and graphic information of the target question may be used to determine two candidate questions and their corresponding text scores and text information weights (G), as shown in Table 2, and two candidate questions and their corresponding graphic scores and graphic information weights (I), as shown in Table 3. The composite scores of the four candidate questions are then calculated using the aforementioned composite score calculation formula (i.e., composite score = text score * text information weight G + graphic score * graphic information weight I). The candidate question with the highest composite score (i.e., the highest) is then selected as the recommended question and presented to the target user. The specific calculation and screening method and order are not limited.
[0125] Furthermore, to improve the effectiveness of topic recommendations, the text information weight (G) and graphic information weight (I) of the topic can be reasonably set, allowing for flexible adjustment of recommendation results based on different application scenarios and needs, thus meeting diverse topic recommendation requirements. For example, if the user wishes to recommend a topic that is more similar to the target topic's text, the text information weight (G) can be increased and the graphic information weight (I) can be decreased. Conversely, if the user wishes to recommend a topic that is more similar to the target topic's graphic, the graphic information weight (I) can be increased and the text information weight (G) can be decreased.
[0126] In summary, the present embodiment provides a method for recommending a topic, which first obtains a target topic for a target user to practice; extracts text information and graphic information of the target topic; and then, using the text information and / or graphic information of the target topic, determines N candidate topics similar to the target topic; wherein N is a positive integer greater than 0; then, uses the N candidate topics to generate prompt instructions, which are input into a large language model to obtain a text information weight and a graphic information weight of each candidate topic in the N candidate topics; and then, uses the text information weight and graphic information weight of each candidate topic in the N candidate topics to calculate a score for each candidate topic; and recommends to the target user candidate topics whose scores meet preset conditions.
[0127] It can be seen that since this application fully considers the text information and graphic information of the target questions practiced by the target users (such as the questions the target users are currently doing, etc.) when recommending questions to the target users (such as students), it can recommend questions with higher accuracy and relevance (especially mixed text and picture questions) to the target users based on a more comprehensive understanding of the content and meaning of the target questions, thereby improving the question-solving effect and learning experience of the target users (such as students).
[0128] Second embodiment
[0129] This embodiment will introduce a topic recommendation device. For related content, please refer to the above method embodiment.
[0130] See also Figure 9 , is a schematic diagram of the composition of a topic recommendation device provided in this embodiment, the device 900 includes:
[0131] Extraction unit 901, used to obtain a target topic for a target user to practice; and extract text information and graphic information of the target topic;
[0132] A determining unit 902 is configured to determine N candidate topics similar to the target topic using the text information and / or graphic information of the target topic; wherein N is a positive integer greater than 0;
[0133] An input unit 903 is configured to generate a prompt instruction using the N candidate questions, input the prompt instruction into the large language model, and obtain a text information weight and a graphic information weight of each candidate question in the N candidate questions;
[0134] The recommendation unit 904 is configured to calculate a score for each of the N candidate topics using the text information weight and the graphic information weight of each candidate topic; and recommend candidate topics whose scores meet preset conditions to the target user.
[0135] In one implementation of this embodiment, the extraction unit 901 is specifically configured to:
[0136] The title information of the target title is processed by using a typesetting engine to extract text content as the text information of the target title; and the graphic content of the title information is cropped to obtain the graphic information of the target title.
[0137] In one implementation of this embodiment, the determining unit 902 is specifically configured to:
[0138] Calculate the vector similarity between the text information of the target topic and the text information of each topic in the pre-built topic text vector database, and based on the calculation results, screen out N topics that meet the preset text vector similarity conditions as N candidate topics similar to the target topic.
[0139] In one implementation of this embodiment, the determining unit 902 is specifically configured to:
[0140] Calculate the vector similarity between the graphic information of the target question and the graphic information of each question in a pre-built question graphic vector database, and based on the calculation results, screen out N questions that meet the preset graphic vector similarity conditions as N candidate questions similar to the target question.
[0141] In one implementation of this embodiment, the determining unit 902 includes:
[0142] A first calculation subunit is configured to calculate vector similarities between the text information of the target question and the text information of each question in a pre-constructed question text vector database, and select M questions that meet a preset text vector similarity condition based on the calculation results; M is a positive integer greater than 0;
[0143] a second calculation subunit, configured to calculate vector similarity between the graphic information of the target question and the graphic information of each question in a pre-built question graphic vector database, and select K questions that meet a preset graphic vector similarity condition based on the calculation result; wherein K is a positive integer greater than 0;
[0144] The screening subunit is configured to screen out N identical topics from the M topics and the K topics as N candidate topics similar to the target topic.
[0145] In one implementation of this embodiment, the recommendation unit 904 includes:
[0146] A first determining subunit is configured to determine a text score of each candidate topic according to a vector similarity between the text information of each candidate topic in the N candidate topics and the text information of the target topic;
[0147] a second determining subunit, configured to determine a graphic score for each candidate question in the N candidate questions based on a vector similarity between the graphic information of each candidate question and the graphic information of the target question;
[0148] The third calculation subunit is used to use the text information weight and graphic information weight of each candidate topic in the N candidate topics to perform weighted sum calculation on the text score and graphic score of each candidate topic to obtain the comprehensive score of each candidate topic.
[0149] In one implementation of this embodiment, the recommendation unit 904 is specifically configured to:
[0150] The highest comprehensive score is screened out from the comprehensive scores of each candidate topic, and the candidate topic corresponding to the highest comprehensive score is recommended to the target user.
[0151] Furthermore, an embodiment of the present application also provides a topic recommendation device, comprising: a processor, a memory, and a system bus;
[0152] The processor and the memory are connected via the system bus;
[0153] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any one of the implementation methods of the above-mentioned question recommendation method.
[0154] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes any one of the implementation methods of the above-mentioned topic recommendation method.
[0155] Furthermore, an embodiment of the present application also provides a computer program product, which, when running on a terminal device, enables the terminal device to execute any one of the implementation methods of the above-mentioned topic recommendation method.
[0156] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in each embodiment of the present application or certain parts of the embodiments.
[0157] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the methods.
[0158] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0159] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A topic recommendation method, characterized in that: include: Obtain target questions for target users to practice; and extracting text information and graphic information of the target topic; Determine N candidate topics similar to the target topic using the text information and / or graphic information of the target topic, where N is a positive integer greater than 0; Generating prompt instructions using the N candidate questions and inputting them into a large language model to obtain a text information weight and a graphic information weight of each candidate question in the N candidate questions; Calculating a score for each of the N candidate topics using the text information weight and the graphic information weight of each candidate topic; And recommend candidate questions whose scores meet preset conditions to the target user.
2. The method according to claim 1, characterized in that The extracting of text information and graphic information of the target topic includes: The title information of the target title is processed by using a typesetting engine to extract text content as the text information of the target title; and the graphic content of the title information is cropped to obtain the graphic information of the target title.
3. The method according to claim 1, characterized in that The determining N candidate topics similar to the target topic by using the text information and / or graphic information of the target topic includes: Calculate the vector similarity between the text information of the target topic and the text information of each topic in the pre-built topic text vector database, and based on the calculation results, screen out N topics that meet the preset text vector similarity conditions as N candidate topics similar to the target topic.
4. The method according to claim 1, wherein The determining N candidate topics similar to the target topic by using the text information and / or graphic information of the target topic includes: Calculate the vector similarity between the graphic information of the target question and the graphic information of each question in a pre-built question graphic vector database, and based on the calculation results, screen out N questions that meet the preset graphic vector similarity conditions as N candidate questions similar to the target question.
5. The method according to claim 1, wherein The determining N candidate topics similar to the target topic by using the text information and / or graphic information of the target topic includes: Calculating the vector similarity between the text information of the target question and the text information of each question in a pre-built question text vector database, and screening out M questions that meet a preset text vector similarity condition based on the calculation result; wherein M is a positive integer greater than 0; Calculating vector similarity between the graphic information of the target question and the graphic information of each question in a pre-built question graphic vector database, and selecting K questions that meet a preset graphic vector similarity condition based on the calculation result; K is a positive integer greater than 0; N identical topics are screened out from the M topics and the K topics as N candidate topics similar to the target topic.
6. The method according to any one of claims 1 to 5, characterized in that The step of calculating the score of each candidate topic by using the text information weight and the graphic information weight of each candidate topic in the N candidate topics includes: Determining a text score for each candidate topic according to a vector similarity between the text information of each candidate topic in the N candidate topics and the text information of the target topic; Determining a graphic score for each candidate question according to a vector similarity between the graphic information of each candidate question in the N candidate questions and the graphic information of the target question; The text information weight and the graphic information weight of each candidate topic in the N candidate topics are used to perform a weighted sum calculation on the text score and the graphic score of each candidate topic to obtain a comprehensive score for each candidate topic.
7. The method according to claim 6, characterized in that The step of recommending candidate questions whose scores meet preset conditions to the target user includes: The highest comprehensive score is screened out from the comprehensive scores of each candidate topic, and the candidate topic corresponding to the highest comprehensive score is recommended to the target user.
8. A topic recommendation device, characterized in that: include: An extraction unit, used to obtain target questions for target users to practice; and extracting text information and graphic information of the target topic; a determining unit, configured to determine N candidate topics similar to the target topic using the text information and / or graphic information of the target topic, wherein N is a positive integer greater than 0; An input unit, configured to generate a prompt instruction using the N candidate questions, input the prompt instruction into the large language model, and obtain a text information weight and a graphic information weight of each candidate question in the N candidate questions; A recommendation unit, configured to calculate a score for each of the N candidate topics using a text information weight and a graphic information weight of each candidate topic; And recommend candidate questions whose scores meet preset conditions to the target user.
9. A topic recommendation device, characterized in that: include: Processor, memory, system bus; The processor and the memory are connected via the system bus; The memory is configured to store one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by the processor, the processor is enabled to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Test question resource recommendation method and device, electronic equipment and storage medium
CN115935967A
Heavy question judgment method and device, equipment and storage medium
CN116665239A
Question searching method, question searching algorithm training method and device, electronic equipment and medium
CN117573900A
Dam defect image-text cross-modal retrieval method and model
WO2022242388A1
Cited By
Cold start information recommendation method and device based on large model, equipment, medium and program
CN121502081A