Topic generation method and device, electronic equipment and computer readable storage medium
By extracting text information from the document selected by the user and determining the question-setting direction based on the key information, generating candidate questions and selecting target questions, the problem of low matching between Q&A questions and user needs in the prior art is solved, and higher flexibility and accuracy are achieved.
Patent Information
- Application Number
- CN202411875820.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-18
AI Technical Summary
The existing method of generating questions and answers is not very consistent with the actual needs of users, resulting in insufficient flexibility and accuracy in generating questions.
By extracting text information from the document selected by the user, the key information in the text information is determined, the question setting direction is determined based on these key information, the candidate topic is generated, and the target topic is finally selected from the candidate topic. Users can participate in multiple links to improve matching.
It improves the matching degree between Q&A questions and user needs, and enhances the flexibility and accuracy of question generation.
Smart Images

Figure CN119848193A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more specifically, to a question generating method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the continuous development of computer technology, the application of artificial intelligence generated content (AIGC) technology in daily life has become more and more extensive, such as media entertainment, advertising marketing, education, medical care, finance, etc. Taking the field of education as an example, the existing technology can generate question-and-answer questions based on AICG technology and text information provided by users, but the existing question-and-answer question generation method often does not match the actual needs of users. Summary of the invention
[0003] In view of this, embodiments of the present invention provide a question generation method, device, electronic device and computer-readable storage medium to improve the matching degree between question and answer questions and user needs, thereby improving the flexibility and accuracy of question generation.
[0004] In a first aspect, an embodiment of the present invention provides a method for generating a topic, the method comprising:
[0005] In response to obtaining the file to be processed, extracting text information in the file to be processed;
[0006] Determining multiple key information in the text information;
[0007] Determining the direction of questions according to the selected key information;
[0008] Generate candidate questions corresponding to the to-be-processed file according to the question direction;
[0009] Determine a target topic corresponding to the file to be processed according to the candidate topics.
[0010] Optionally, the determining a plurality of key information in the text information includes:
[0011] determining a plurality of paragraphs in the text information;
[0012] The plurality of key information in a target paragraph is identified, and the target paragraph is a selected paragraph.
[0013] Optionally, the target paragraph is determined according to acquired first feedback information, and the first feedback information is determined according to a selection operation on the paragraph.
[0014] Optionally, the selected key information is determined according to the acquired second feedback information, and the second feedback information is determined according to a selection operation on the key information.
[0015] Optionally, generating candidate questions corresponding to the to-be-processed file according to the question direction includes:
[0016] The candidate questions are generated based on a large language model according to the question setting direction and question attribute information, wherein the question attribute information includes at least one of question type, question style information and question scenario information.
[0017] Optionally, generating candidate questions corresponding to the to-be-processed file according to the question direction includes:
[0018] The candidate questions are generated in the current round according to the third feedback information obtained in the current round and the context information of the large language model, wherein the context information includes the question direction and the candidate questions generated in the previous round.
[0019] Optionally, determining a target topic corresponding to the to-be-processed file according to the candidate topics includes:
[0020] Deduplication processing is performed on each of the candidate topics based on the similarity of each of the candidate topics;
[0021] The candidate topics after deduplication are determined as the target topics.
[0022] Optionally, the method further comprises:
[0023] A preset knowledge base is updated based on the target topic to serve as retrieval enhancement information for a large language model.
[0024] In a second aspect, an embodiment of the present invention provides a question generating device, the device comprising:
[0025] An information extraction unit, configured to extract text information from the file to be processed in response to obtaining the file to be processed;
[0026] An information determination unit, used to determine a plurality of key information in the text information;
[0027] A direction determination unit, used for determining a question direction according to the selected key information;
[0028] A question generating unit, used for generating candidate questions corresponding to the to-be-processed file according to the question setting direction;
[0029] The topic determination unit is used to determine the target topic corresponding to the to-be-processed file according to the candidate topics.
[0030] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement a method as described in any one of the first aspects.
[0031] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in any one of the first aspects is implemented.
[0032] In a fifth aspect, an embodiment of the present invention provides a computer program product, wherein the computer program product comprises a computer program / instructions, and when the computer program / instructions are executed by a processor, the method as described in any one of the first aspects is implemented.
[0033] The embodiment of the present invention can extract text information from the document selected by the user, and determine multiple key information in the text information, and then determine the question direction according to the selected key information, and generate candidate questions corresponding to the document according to the question direction, so as to select the target question from the candidate questions. In the embodiment of the present invention, the user can participate in multiple links of question generation, so the matching degree between the question and answer questions and the user needs can be improved, thereby improving the flexibility and accuracy of question generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0035] Figure 1 is a flow chart of a method for generating a topic according to an embodiment of the present invention;
[0036] Figure 2 is a schematic diagram of an interface of an embodiment of the present invention;
[0037] Figure 3 is another interface schematic diagram of an embodiment of the present invention;
[0038] Figure 4 is another interface schematic diagram of an embodiment of the present invention;
[0039] Figure 5 is another interface schematic diagram of an embodiment of the present invention;
[0040] Figure 6 is a data flow chart of a method for generating a topic according to an embodiment of the present invention;
[0041] Figure 7 is a schematic diagram of a question generating device according to an embodiment of the present invention;
[0042] Figure 8 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for those skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, flows, components and circuits are not described in detail.
[0044] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.
[0045] Unless the context clearly requires otherwise, the words "include", "comprising" and similar words throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is "including but not limited to".
[0046] In the description of this application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.
[0047] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0048] With the continuous development of AIGC technology, large language models can generate various content required by users based on the information provided by users, such as generating question-and-answer questions. Large language models can undoubtedly improve the efficiency of generating question-and-answer questions, but due to the limitations of large language models on input formats and existing process design, users are usually less involved in the generation of question-and-answer questions. Therefore, the generated question-and-answer questions often do not match the actual needs of users, which in turn leads to low accuracy in question generation.
[0049] In order to solve the above problems, the embodiments of the present invention propose a question generation method, device, electronic device and computer-readable storage medium to improve the matching degree between question and answer questions and user needs, thereby improving the flexibility and accuracy of question generation.
[0050] The following is an explanation of the method by way of an embodiment. Figure 1 FIG. 1 is a flowchart of a method for generating a topic according to an embodiment of the present invention. Figure 1 As shown, the method of this embodiment includes the following steps:
[0051] Step S100: In response to obtaining the file to be processed, extracting text information in the file to be processed.
[0052] In this embodiment, the terminal can determine the file selected by the user through various channels, such as from the local memory, the preset database, other devices, etc. as the to-be-processed file. After obtaining the to-be-processed file, the terminal can extract the text information in the to-be-processed file, or upload the to-be-processed file to the server and extract the text information in the to-be-processed file through the server.
[0053] In this step, text information can be extracted from the file to be processed in a corresponding manner according to the type of the file to be processed, and this embodiment does not limit it. For example, if the file to be processed is an image of a paper file or a file in PDF (Portable Document Format) format collected by an image acquisition device (such as a scanner, a smart phone, etc.), optical character recognition (OCR, Optical Character Recognition) can be performed on the image of the paper file or the file in PDF format to obtain the text information therein as the text to be extracted; or, if the file to be processed is an audio file or a video file, speech recognition can be performed on the audio file or the video file, and the speech recognition result is determined as the text information in the file to be processed; for another example, if the file to be processed is various existing text files, such as a text file in *.txt format, a text file in *.doc format, a text file in *.docx format, etc., the text information in the file to be processed can be directly read.
[0054] Step S200, determining a plurality of key information in the text information.
[0055] In this step, the terminal or server can determine multiple key information in the text information based on various existing methods, which are not limited in this embodiment. For example, the terminal or server can count the frequency of each word in the text information based on a preset statistical method, such as TF-IDF (TermFrequency-Inverse Document Frequency), a bag of words model, etc., and determine the key information based on the frequency of each word; or, the terminal or server can also identify multiple key information in the text information based on a natural language processing (NLP) model, such as a neural network-based model, an attention mechanism-based model, a large language model, etc.
[0056] This embodiment does not limit the number of characters in the text information, but too many characters will burden the computing resources of the terminal or server and reduce the information processing performance of the terminal or server, and also reduce the accuracy of key information identification. Therefore, optionally, the terminal or server can determine multiple paragraphs in the text information and identify multiple key information selected as target paragraphs in these multiple paragraphs.
[0057] Among them, the terminal or the server can determine the target paragraph according to the feedback information obtained, that is, the first feedback information, and the first feedback information is determined according to the selection operation on the paragraph. Further, if the execution subject is a server, the server can send these paragraphs to the terminal so that the terminal can display these paragraphs, and receive the user's selection operation on the paragraph through an option control, such as a check box, and determine the first feedback information according to the user's selection operation on the paragraph, and then send the first feedback information to the server; if the execution subject is a terminal, the terminal can directly display these paragraphs, and receive the user's selection operation on the paragraph through the option control, and then determine the first feedback information.
[0058] Figure 2 Schematic diagram of an interface of an embodiment of the present invention. Figure 2 As shown, the terminal can display multiple paragraphs in the text information of the file to be processed in a preset page, namely, paragraph P1 and paragraph P2, and receive the user's selection operation on paragraph P1 and paragraph P2 through the option control. Specifically, the selection operation on paragraph P1 can be received through control 21, and the selection operation on paragraph P2 can be received through control 22. At the same time, the selection operation on each paragraph can be received through the "one-key selection" control 23. After the user clicks the "one-key selection" control 23, the terminal can determine that the first feedback information indicates that paragraph P1 and paragraph P2 are selected, and then determine that the target paragraphs are paragraphs P1 and paragraph P2.
[0059] Optionally, if the user thinks the selected paragraph is not ideal, the terminal may further determine the first feedback information according to the user's selection operation on the paragraph, so that the terminal or the server may further determine the target paragraph according to the first feedback information, and further determine the key information in the target paragraph.
[0060] Figure 3 is another interface schematic diagram of an embodiment of the present invention. Figure 2 ,like Figure 3 As shown, the terminal can display a "clear text" control 31 and a "generate knowledge point" control 32 in the preset page. If the user clicks the "clear text" control 31, the terminal can return to Figure 2 The interface shown in the figure receives the user's selection operation on the paragraph through controls 21, 22 and the "one-key selection all" control 23; if the user clicks the "generate knowledge point" control 32, the terminal can generate multiple key information according to the target paragraph.
[0061] Step S300, determining the question direction according to the selected key information.
[0062] In this step, the terminal or server can determine the selected key information based on the user's feedback information on multiple key information, that is, the second feedback information, and perform intention recognition on the selected key information to determine the question direction. For example, if the key information is "be sure to confirm safety before turning left", the question direction can be "necessary operations before turning".
[0063] Furthermore, if the executing entity is a server, the server can send these key information to the terminal so that the terminal can display these paragraphs, and receive the user's selection operation on the key information through option controls, such as check boxes, and then determine the second feedback information based on the user's selection operation on the key information, thereby sending the second feedback information to the server; if the executing entity is a terminal, the terminal can directly display these key information, and receive the user's selection operation on the key information through option controls, and then determine the second feedback information.
[0064] Figure 4 FIG. 1 is another interface schematic diagram of an embodiment of the present invention. Figure 4As shown, the terminal can display multiple key information corresponding to the to-be-processed file in a preset page, that is, knowledge point N1-knowledge point N5, and display option controls 41-option controls 45 corresponding to knowledge point N1-knowledge point N5, wherein the option control corresponding to knowledge point N1 is option control 41, the option control corresponding to knowledge point N2 is option control 42, the option control corresponding to knowledge point N3 is option control 43, the option control corresponding to knowledge point N4 is option control 44, and the option control corresponding to knowledge point N5 is option control 45. After the user selects option control 41, option control 43, and option control 44, and clicks "selection completed" control 46, the terminal can determine that the second feedback information indicates that knowledge point N1, knowledge point N3, and knowledge point N4 are selected, so the question direction can be determined according to knowledge point N1, knowledge point N3, and knowledge point N4.
[0065] Optionally, if the user believes that the selected key information is not ideal, the terminal can also re-determine the second feedback information based on the user's selection operation on the key information, so that the terminal or server can re-determine the selected key information based on the second feedback information, and then determine the direction of the question.
[0066] Figure 5 is another interface schematic diagram of an embodiment of the present invention. Figure 4 ,like Figure 5 As shown, the terminal can "return to the previous step" control 51 in the preset page. When the user clicks the "return to the previous step" control 51, the terminal can return to Figure 4 The interface shown in the figure receives the user's selection operation on key information through controls 41-control 45.
[0067] Step S400, generating candidate questions corresponding to the file to be processed according to the question direction.
[0068] In this step, the terminal or server can determine the prompt word of the large language model according to the question direction and the text information of the file to be processed, and generate candidate questions corresponding to the file to be processed based on the prompt word. The question-and-answer questions of this embodiment include both the question stem and the answer. The large language model used in this embodiment can be various existing large language models, such as the GPT (Generative Pre-trained Transformer) series model, the T5 (Text-to-Text Transfer Transformer text to text converter) series model, the BERT (Bidirectional Encoder Representations from Transformers, based on transformer bidirectional encoder representation) series model, etc., which are not limited in this embodiment.
[0069] In order to further improve the accuracy of question generation and enhance the authenticity and interest of question answers, the terminal or server can also obtain the question attribute information set by the user, and determine the prompt words of the large language model according to the question direction, question attribute information and text information of the file to be processed, and then generate candidate questions.
[0070] The question attribute information may include at least one of the question type, question style information and question scenario information. The question type may include multiple-choice questions (including single-choice questions and multiple-choice questions), true-or-false questions, short-answer questions, fill-in-the-blank questions, etc.
[0071] The question style information can be set according to actual needs, for example, it can include original style, serious style, relaxed style, playful style, etc., among which the original style means that when describing the question stem and answer of the question and answer, the language used is neutral; the serious style means that when describing the question stem and answer of the question and answer, the language used is professional and serious, and no informal expressions and rhetorical devices, such as slang, metaphor, exaggeration, etc., are used; the relaxed style means that when describing the question stem and answer of the question and answer, the language used is colloquial; the playful style means that when describing the question stem and answer of the question and answer, the language used is humorous, and a large number of informal expressions and rhetorical devices can be used.
[0072] The question scene information is used to set the background information such as characters, time, place, events, etc. in the question to improve the respondent's understanding of the question.
[0073] Optionally, the question attribute information may also include other information, such as the randomness of the question (including the randomness of the questioning method, the randomness of the question difficulty, the randomness of the number of questions, etc.), the respondent type, etc., which is not limited in this embodiment.
[0074] by Figure 5 As shown in the figure, the terminal can display the question attribute information and the corresponding setting control (not shown in the figure) and the "click to generate" control 52 in the preset page. When the user clicks the "click to generate" control 52, the terminal can determine the question attribute information set by the user and generate candidate questions according to the question direction and the question attribute information.
[0075] Large language models are prone to "AI hallucinations" (a phenomenon in which the answers given by a large language seem reasonable but do not match the actual situation or the user's question), or the knowledge base used by the large language model when giving answers deviates from the actual situation, thereby reducing the accuracy of question-answering question generation. Therefore, the terminal or server can optionally generate candidate questions in an iterative manner. Specifically, the terminal or server can generate candidate questions in the current round based on the feedback information of the user for the candidate questions in the current round, that is, the third feedback information and the context information of the large language model. Among them, the context information of the large language model may include the question direction and the candidate questions generated in the previous round, and may also include text information of the file to be processed.
[0076] Step S500, determining a target topic corresponding to the file to be processed according to the candidate topics.
[0077] In this step, the terminal or server can determine the target topic corresponding to the to-be-processed file from the candidate topics. Optionally, the server can determine all candidate topics as target topics, or determine the selected candidate topic as the target topic according to the user's selection operation on the candidate topic, or determine the target topic by other methods.
[0078] In an optional implementation, the terminal or server can perform deduplication processing on each candidate topic based on the similarity of each candidate topic, and determine the deduplication candidate topic as the target topic. The similarity between candidate topics can be determined based on various existing methods, such as word-based methods (such as bag-of-words model, TF-IDF, etc.), semantic-based methods (such as Word2Vec), deep learning-based methods (such as large language models), etc., which are not limited in this embodiment.
[0079] Figure 6 is a data flow chart of the topic generation method according to an embodiment of the present invention. Figure 6As shown, after obtaining the file 61 as a to-be-processed file, the terminal or server can extract the text information 62 in the file 61 and determine multiple paragraphs in the text information 62. Then, the terminal can determine the target paragraph 63 among the multiple paragraphs according to the user's selection operation on the paragraph (i.e., paragraph circle selection). If the user thinks that the target paragraph 63 is ideal, the terminal can determine multiple key information 64 in the target paragraph 63, and determine the key information 64 selected from the multiple key information 64 according to the user's selection operation on the key information (i.e., information selection), and determine the question direction 65 according to the selected key information 64; if the user thinks that the target paragraph 63 is not ideal, the terminal can re-circle the paragraph according to the re-determined first feedback information, and determine the target paragraph 63 among the multiple paragraphs. If the user thinks that the question direction 65 is ideal, the terminal can generate candidate questions 66 corresponding to the file 61 according to the question direction 65; if the user thinks that the selected key information 64 is not ideal, the terminal can re-select the information according to the re-determined second feedback information, and determine the key information 64 selected from the multiple key information 64. If the user believes that the generated candidate question 66 is ideal, the terminal can determine the target question 67 based on the candidate question 66, for example, it can deduplicate the candidate question 66; if the user believes that the generated candidate question 66 is not ideal, the terminal can regenerate the candidate question 66 based on the re-determined third feedback information and the context information of the large language model including the question direction 65 and the candidate question 66 generated in the previous round.
[0080] Depend on Figure 6 It can be seen that users have a high degree of participation in paragraph selection, key information selection, question direction selection, candidate question generation and other links. They can make timely corrections and adjustments to information that does not meet their needs, thereby improving the matching degree between question and answer questions and user needs, thereby improving the flexibility and accuracy of question generation.
[0081] In an optional implementation, the method of this embodiment may further include the following steps:
[0082] Step S600: updating the preset knowledge base based on the target topic.
[0083] After determining the target topic, the terminal or server can update the preset knowledge base based on the target topic so that when the large language model performs information retrieval according to user needs, such as topic query and topic recommendation, the target topic can be used as retrieval enhancement information of the large language model to improve the information retrieval capability of the large language model.
[0084] The embodiment of the present invention can extract text information from the document selected by the user, and determine multiple key information in the text information, and then determine the question direction according to the selected key information, and generate candidate questions corresponding to the document according to the question direction, so as to select the target question from the candidate questions. In the embodiment of the present invention, the user can participate in multiple links of question generation, so the matching degree between the question and answer questions and the user needs can be improved, thereby improving the flexibility and accuracy of question generation.
[0085] Figure 7 Schematic diagram of a question generating device according to an embodiment of the present invention. Figure 7 As shown, the topic generating device of this embodiment includes an information extracting unit 701 , an information determining unit 702 , a direction determining unit 703 , a topic generating unit 704 and a topic determining unit 705 .
[0086] Among them, the information extraction unit 701 is used to extract text information in the file to be processed in response to obtaining the file to be processed; the information determination unit 702 is used to determine multiple key information in the text information; the direction determination unit 703 is used to determine the question direction according to the selected key information; the question generation unit 704 is used to generate candidate questions corresponding to the file to be processed according to the question direction; the question determination unit 705 is used to determine the target question corresponding to the file to be processed according to the candidate questions.
[0087] Furthermore, the information determination unit 702 includes a paragraph determination subunit and an information identification subunit.
[0088] The paragraph determination subunit is used to determine multiple paragraphs in the text information; the information identification subunit is used to identify the multiple key information in the target paragraph, and the target paragraph is the selected paragraph.
[0089] Furthermore, the target paragraph is determined according to the acquired first feedback information, and the first feedback information is determined according to a selection operation on the paragraph.
[0090] Further, the selected key information is determined according to the acquired second feedback information, and the second feedback information is determined according to a selection operation on the key information.
[0091] Furthermore, the topic generating unit 704 includes a topic generating sub-unit.
[0092] Among them, the question generation subunit is used to generate the candidate questions based on the large language model according to the question direction and question attribute information, and the question attribute information includes at least one of the question type, question style information and question scenario information.
[0093] Furthermore, the question generating unit 704 includes a question iteration subunit.
[0094] Among them, the question iteration subunit is used to generate the candidate questions in the current round according to the third feedback information obtained in the current round and the context information of the large language model, and the context information includes the question direction and the candidate questions generated in the previous round.
[0095] Furthermore, the topic determination unit 705 includes a deduplication subunit and a topic determination subunit.
[0096] The deduplication subunit is used to perform deduplication processing on each candidate topic based on the similarity of each candidate topic; and the topic determination subunit is used to determine the candidate topic after deduplication as the target topic.
[0097] Furthermore, the device also includes an information updating unit.
[0098] The information updating unit is used to update the preset knowledge base based on the target topic to serve as retrieval enhancement information of the large language model.
[0099] The embodiment of the present invention can extract text information from the document selected by the user, and determine multiple key information in the text information, and then determine the question direction according to the selected key information, and generate candidate questions corresponding to the document according to the question direction, so as to select the target question from the candidate questions. In the embodiment of the present invention, the user can participate in multiple links of question generation, so the matching degree between the question and answer questions and the user needs can be improved, thereby improving the flexibility and accuracy of question generation.
[0100] Figure 8 Schematic diagram of an electronic device according to an embodiment of the present invention. In this embodiment, the electronic device 8 includes a server, a terminal, etc. Figure 8 As shown, the electronic device 8: includes at least one processor 801; and a memory 802 communicatively connected to at least one processor 801; and a communication component 803 communicatively connected to a scanning device, the communication component 803 receiving and sending data under the control of the processor 801; wherein the memory 802 stores instructions executable by at least one processor 801, and the instructions are executed by at least one processor 801 to implement the above-mentioned question generation method.
[0101] Specifically, the electronic device includes: one or more processors 801 and a memory 802, Figure 8 A processor 801 is taken as an example. The processor 801 and the memory 802 may be connected via a bus or other means. Figure 8In the example, the bus connection is used. The memory 802 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The processor 801 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions and modules stored in the memory 802, that is, the above-mentioned question generation method is realized.
[0102] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store a list of options, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 802 may optionally include a memory remotely arranged relative to the processor 801, and these remote memories may be connected to an external device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0103] One or more modules are stored in the memory 802, and when executed by one or more processors 801, the topic generating method in any of the above method embodiments is executed.
[0104] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.
[0105] The embodiment of the present invention can extract text information from the document selected by the user, and determine multiple key information in the text information, and then determine the question direction according to the selected key information, and generate candidate questions corresponding to the document according to the question direction, so as to select the target question from the candidate questions. In the embodiment of the present invention, the user can participate in multiple links of question generation, so the matching degree between the question and answer questions and the user needs can be improved, thereby improving the flexibility and accuracy of question generation.
[0106] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, wherein the computer-readable program is used for a computer to execute part or all of the above method embodiments.
[0107] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0108] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating a topic, characterized in that: The method comprises: In response to obtaining the file to be processed, extracting text information in the file to be processed; Determining multiple key information in the text information; Determining the direction of questions according to the selected key information; Generate candidate questions corresponding to the to-be-processed file according to the question direction; Determine a target topic corresponding to the file to be processed according to the candidate topics.
2. The method according to claim 1, characterized in that Determining the multiple key information in the text information includes: determining a plurality of paragraphs in the text information; The plurality of key information in a target paragraph is identified, and the target paragraph is a selected paragraph.
3. The method according to claim 2, characterized in that The target paragraph is determined according to the acquired first feedback information, and the first feedback information is determined according to a selection operation on the paragraph.
4. The method according to claim 1, characterized in that: The selected key information is determined according to the acquired second feedback information, and the second feedback information is determined according to a selection operation on the key information.
5. The method according to claim 1, characterized in that Generating candidate questions corresponding to the to-be-processed file according to the question direction includes: The candidate questions are generated based on a large language model according to the question setting direction and question attribute information, wherein the question attribute information includes at least one of question type, question style information and question scenario information.
6. The method according to claim 1, characterized in that Generating candidate questions corresponding to the to-be-processed file according to the question direction includes: The candidate questions are generated in the current round according to the third feedback information obtained in the current round and the context information of the large language model, wherein the context information includes the question direction and the candidate questions generated in the previous round.
7. The method according to claim 1, characterized in that Determining the target topic corresponding to the to-be-processed file according to the candidate topic includes: Deduplication processing is performed on each of the candidate topics based on the similarity of each of the candidate topics; The candidate topics after deduplication are determined as the target topics.
8. The method according to claim 1, characterized in that: The method further comprises: A preset knowledge base is updated based on the target topic to serve as retrieval enhancement information for a large language model.
9. A question generating device, characterized in that: The device comprises: An information extraction unit, configured to extract text information from the file to be processed in response to obtaining the file to be processed; An information determination unit, used to determine a plurality of key information in the text information; A direction determination unit, used for determining a question direction according to the selected key information; A question generating unit, used for generating candidate questions corresponding to the to-be-processed file according to the question setting direction; The topic determination unit is used to determine the target topic corresponding to the to-be-processed file according to the candidate topics.
10. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The computer program product comprises a computer program / instructions, which implement the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Cited By
Question and answer screening method and device, electronic equipment and storage medium
CN120492574A