Scientific research problem text generation method and device, electronic equipment and storage medium

By constructing input sequences and using scientific research problem text generation models to generate candidate problem texts, and filtering out target scientific research problem texts based on novelty, the problem that existing technology cannot inspire innovation in the scientific research field is solved, and the effect of generating new scientific research problem texts is achieved.

CN119623482APending Publication Date: 2025-03-14INST OF SCI & TECHN INFORMATION OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411801048.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Existing automatic problem generation technology cannot inspire innovation in scientific research or academic fields, and can only assist in understanding and analyzing existing scientific research problems.

Method used

By constructing an input sequence, including the target keywords and occlusion codes, and inputting a pre-trained scientific research problem text generation model, generating an output sequence, and then filling in the target keywords in the output sequence to obtain the candidate problem text, and filtering out the target scientific research problem text based on the novelty of the candidate problem text.

Benefits of technology

The generation of new scientific research problem texts that are different from existing scientific research problem texts through target keywords are achieved, allowing researchers to conduct innovative research based on these problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623482A_ABST
    Figure CN119623482A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a scientific research problem text generation method and device, electronic equipment and a storage medium, and relates to the technical field of text generation. The method comprises the following steps: constructing an input sequence according to at least one target keyword; inputting the input sequence into a pre-trained scientific research problem text generation model, and outputting at least one output sequence according to the scientific research problem text generation model; for each output sequence, filling target keywords among the text blocks in the output sequence to obtain candidate question texts corresponding to the output sequence; for each candidate question text, obtaining the novelty of the candidate question text; and according to the novelty of each candidate problem text, the target scientific research problem text is determined from each candidate problem text, and a new target scientific research problem text different from the existing scientific research problem text can be generated through the target keyword, so that researchers can perform innovative research based on the target scientific research problem text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of text generation, and in particular, to a method, device, electronic device and storage medium for generating scientific research question text. Background Art

[0002] Existing Automatic Question Generation (AQG) technology generally takes a text as input, and the computer generates interrogative sentences according to certain rules or semantic models to construct questions so that the answers are in the given input text, thereby providing users in the fields of question-answering systems, information retrieval and intelligent search engines with a more efficient, accurate and personalized way of exchanging and acquiring information.

[0003] Obviously, the questions currently generated by AQG have clear answers, and the texts generated are highly consistent with the original texts, and cannot generate new texts that are different from existing texts. In other words, when AQG technology is applied to scientific research or academic fields, it can only assist researchers in understanding and analyzing existing scientific research problems, but cannot inspire researchers to innovate. Summary of the invention

[0004] The embodiments of the present disclosure provide a method, device, electronic device and storage medium for generating a scientific research question text, which are used to solve the technical problem that the existing automatic question generation technology in the prior art cannot be used to inspire scientific researchers to innovate.

[0005] According to one aspect of an embodiment of the present disclosure, a method for generating a scientific research question text is provided, comprising: According to at least one target keyword, construct an input sequence, the input sequence comprising at least one target keyword and a plurality of masking codes, wherein the first and last portions of the at least one target keyword are respectively adjacent to a masking code; Inputting an input sequence into a pre-trained scientific research question text generation model, outputting at least one output sequence according to the scientific research question text generation model, the output sequence including a text block corresponding to each masking code, the scientific research question text generation model is obtained by retraining a pre-trained language model through a sample input sequence and a sample output sequence, and both the sample input sequence and the sample output sequence are obtained by processing scientific research question texts in a question text set; For each output sequence, fill the target keywords between each text block in the output sequence to obtain the candidate question text corresponding to the output sequence; For each candidate question text, obtain the novelty of the candidate question text, which is positively correlated with the semantic distance between the candidate question text and the existing question text. The existing question text is the existing scientific research question text that contains the target keyword in the question text set. According to the novelty of each candidate question text, the target scientific research question text is determined from among the candidate question texts.

[0006] According to another aspect of the embodiment of the present disclosure, there is provided a device for generating a scientific research question text, comprising: An input sequence construction module, used to construct an input sequence according to at least one target keyword, the input sequence comprising at least one target keyword and a plurality of masking codes, wherein the first and last portions of the at least one target keyword are respectively adjacent to a masking code; An output sequence acquisition module is used to input an input sequence into a pre-trained scientific research question text generation model, and output at least one output sequence according to the scientific research question text generation model, wherein the output sequence includes a text block corresponding to each masking code, and the scientific research question text generation model is obtained by retraining a pre-trained language model through a sample input sequence and a sample output sequence, and both the sample input sequence and the sample output sequence are obtained by processing the scientific research question text in the question text set; An output sequence processing module is used to fill target keywords between text blocks in each output sequence to obtain candidate question texts corresponding to the output sequence; A novelty acquisition module is used to obtain the novelty of each candidate question text, wherein the novelty is positively correlated with the semantic distance between the candidate question text and the existing question text, and the existing question text is the existing scientific research question text that contains the target keyword in the question text set; The question text determination module is used to determine the target scientific research question text from various candidate question texts based on the novelty of each candidate question text.

[0007] According to another aspect of an embodiment of the present disclosure, an electronic device is provided. The electronic device includes a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any of the above embodiments.

[0008] According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method provided in any of the above embodiments are implemented.

[0009] According to one aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, and the computer program is executed by a processor to perform the steps of the method provided in any of the above embodiments.

[0010] The technical solution provided by the embodiments of the present disclosure has the following beneficial effects: An input sequence is constructed according to target keywords, and the input sequence is input into the scientific research question text generation model to obtain an output sequence. The output sequence is filled with target keywords to obtain candidate question texts. The novelty of the candidate question texts reflects the semantic distance between the candidate question texts and the existing question texts. The target scientific research question texts are screened out from the candidate question texts, and new target scientific research question texts that are different from the existing scientific research question texts can be generated through target keywords, so that researchers can conduct innovative research based on the target scientific research question texts. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for describing the embodiments of the present disclosure are briefly introduced below.

[0012] Figure 1 A flowchart of a method for generating a scientific research question text provided by an embodiment of the present disclosure; Figure 2 A schematic diagram of a novelty calculation method provided in an embodiment of the present disclosure; Figure 3 A schematic diagram of a training data set construction process provided in an embodiment of the present disclosure; Figure 4 A schematic diagram of a problem sentence set construction process provided by an embodiment of the present disclosure; Figure 5 A schematic diagram of an output sequence acquisition process provided by an embodiment of the present disclosure; Figure 6 A schematic diagram of a method flow for generating a scientific research question text provided by an embodiment of the present disclosure; Figure 7 A schematic diagram of the structure of a scientific research question text generation device provided in an embodiment of the present disclosure; Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0013] The embodiments of the present disclosure are described below in conjunction with the drawings in the present disclosure. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions of the embodiments of the present disclosure.

[0014] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present disclosure refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" may be implemented as "A", or as "B", or as "A and B".

[0015] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

[0016] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present disclosure and the technical effects produced by the technical solutions of the present disclosure. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.

[0017] The following is an explanation of the terms and related technologies involved in this application: Text generation is an important area of ​​natural language processing. Text generation aims to generate credible and readable human language text from various forms of input data, including text, images, tables, and knowledge bases.

[0018] Early text generation methods were generally based on statistical language models, which modeled the conditional probability of words given the context of the language model N-gram. Although this method was simple, it had problems such as sparse data and poor mapping of similar tokens. With the rise of deep learning, neural network models have become the mainstream method for text generation because they do not require feature engineering and can handle the mapping relationship between input and output well.

[0019] Text generation is usually controlled. Controlled text generation means that in the text generation process, certain control means are used to achieve specific requirements for the generated text. According to the control conditions, it can be divided into attribute (style) control, topic (theme) control, vocabulary control, format control, structured data control, etc. Common controlled text generation methods include controlled tagging, controlled embedding vector method, controlled probability distribution method, template-based method, and reinforcement learning method. The most common sequence of input data for text generation is text sequence, which covers many applications, such as machine translation, text summarization, dialogue generation, or story generation.

[0020] Question generation is an important subtask in text generation. It aims to generate questions that are relevant to the input content and grammatically fluent based on the input data (text, knowledge base, image, etc., this article only focuses on text types).

[0021] Specifically, question generation usually outputs the most likely question based on the input text content and the target answer. It can also generate questions without answers. For example, based on the sentence "The sky is blue," it generates questions such as "What color is the sky?" and "What is blue?"

[0022] Question generation is a natural language processing task associated with machine reading comprehension (MRC). In the field of education, it can be used to test readers' understanding of key concepts, extraction and summary of text information, deductive reasoning of core ideas, etc. through generated questions. It can also be used in auxiliary question-answering systems and auxiliary dialogue systems.

[0023] There are two main methods for question generation: rule-based and template-based question generation methods and Shenjiang network-based generation methods. Although the questions generated by rule-based and template-based methods have good fluency and relevance, they require a lot of manpower and have poor generalization and scalability. Most neural network-based methods are based on the question generation of sequence-to-sequence (seq2seq) encoder-decoder model structures, such as the Long Short-Term Memory (LSTM) model and the Transformer model, which enable question generation to be performed in an end-to-end manner, eliminating the tedious process of manually designing rules.

[0024] Existing AQG research generally takes a piece of text as input, and the computer generates interrogative sentences according to certain rules or semantic models to construct questions so that the answers are in the given input text, thereby providing users in the fields of question-answering systems, information retrieval and intelligent search engines with a more efficient, accurate and personalized way of exchanging and acquiring information.

[0025] Obviously, the questions generated by AQG have clear answers, and the text generated by it is required to maintain a high degree of consistency with the original text, and cannot generate new texts that are different from existing texts. In other words, when AQG technology is applied to scientific research or academic fields, it can only assist researchers in understanding and analyzing existing scientific research problems, and cannot inspire researchers to innovate.

[0026] Based on this, the embodiment of the present disclosure provides a method for generating scientific research question text, which is used to solve the technical problem that the AQG technology in the above related technologies cannot be used to inspire scientific researchers to innovate to a certain extent.

[0027] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present disclosure and the technical effects produced by the technical solutions of the present disclosure. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.

[0028] It can be understood that in the method for generating scientific research question text provided by the embodiment of the present disclosure, any method step can be executed by an electronic device and / or a server, and all steps in the method can be executed independently by the electronic device or the server, or jointly by the electronic device and the server.

[0029] The server may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services. The electronic device may be a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device (such as a smart speaker), a wearable electronic device (such as a smart watch), a vehicle terminal, a smart home appliance (such as a smart TV), an AR / VR device, etc., but is not limited thereto.

[0030] The following describes the embodiments of the present disclosure using an electronic device as the execution subject, however, this does not constitute a limitation on the embodiments of the present disclosure. In addition to the scientific research question text generation scenario, the method provided in the embodiments of the present disclosure can also be applied to other scenarios for generating novel texts that are different from the texts in the original text set.

[0031] Figure 1 A flow chart of a method for generating a scientific research question text provided by an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the technical solution provided by the embodiment of the present disclosure includes the following steps: Step S101: construct an input sequence according to at least one target keyword, wherein the input sequence includes at least one target keyword and a plurality of masking codes, wherein the beginning and the end of at least one target keyword are respectively adjacent to a masking code.

[0032] Specifically, the method for generating a scientific research question text provided by the embodiment of the present disclosure is used to realize generating a target scientific research question text including various target keywords and different from the existing scientific research question text according to at least one target keyword. The scientific research question refers to a clear and specific research topic.

[0033] Taking inputting any at least one target keyword as an example, each step of the method for generating a scientific research question text provided in the embodiment of the present disclosure is described in detail.

[0034] At least one target keyword is determined. In step S101, an input sequence is constructed according to the at least one target keyword, and the input sequence includes at least one target keyword and a plurality of mask codes. It can be understood that, for any keyword, its corresponding input sequence is formed by combining the keyword and the mask code according to a preset rule, wherein the first and last of the at least one target keyword are respectively adjacent to a mask code.

[0035] It can be understood that the input sequence is used as the input of the pre-trained scientific research question text generation model, and the task of the scientific research question text generation model is to predict the text blocks covered by each masking code. Since in the embodiment of the present disclosure, the number of target keywords can be one or more, for different numbers of target keywords, a variety of preset rules can be set to combine target keywords and masking codes, and the number of target keywords and the corresponding preset rules can be set according to actual needs.

[0036] For example, the input sequence can be determined by setting corresponding preset rules for the number of target keywords according to the number of keywords. For example, when the number of keywords is 1, the input sequence corresponding to keyword K1 is [MASK] K1 [MASK], and when the number of keywords is 2, the input sequences corresponding to keywords K1 and K2 are [MASK] K1[MASK]K2 [MASK].

[0037] It is understandable that in addition to the above-mentioned spacing method between keywords, when there are multiple keywords, preset rules can also be set to connect the keywords in the output sequence. For example, the input sequence corresponding to keywords K1 and K2 is [MASK] K1 K2 [MASK].

[0038] The above number of keywords and the rules for determining their corresponding input sequences are only used as a specific example to illustrate the embodiments of the present disclosure and are not intended to limit the embodiments of the present disclosure. In the actual application of the present invention, the number of keywords and the corresponding preset rules can be determined according to actual needs.

[0039] In addition, in Natural Language Processing (NLP), [MASK] is a commonly used masking code. In addition, other signs or placeholders with the same functions can be used as masking codes according to actual needs.

[0040] Step S102, input the input sequence into a pre-trained scientific research question text generation model, output at least one output sequence according to the scientific research question text generation model, the output sequence includes a text block corresponding to each masking code, the scientific research question text generation model is obtained by retraining the pre-trained language model through sample input sequence and sample output sequence, and the sample input sequence and the sample output sequence are both obtained by processing the scientific research question text in the question text set.

[0041] Specifically, after obtaining the input sequence corresponding to the target keyword, in step S102, the input sequence is input into a pre-trained scientific research question text generation model, and the text block covered by the cover code in the input sequence is predicted according to the scientific research question text generation model, and at least one output sequence is output.

[0042] It should be noted that the scientific research question text generation model plays the role of predicting the text blocks covered by the cover codes in the input sequence. For the same input sequence, the scientific research question text generation model can generate multiple prediction results, so it outputs at least one output sequence, and the output sequence includes the text blocks corresponding to each cover code.

[0043] It is understandable that before using the scientific research question text generation model, it is also necessary to pre-construct sample input sequence and sample output sequence pairs to train the scientific research question text generation model. The pre-trained scientific research question text generation model is obtained by retraining the pre-trained language model (fine-tuning the pre-trained language model) with the sample input sequence as input and the sample output sequence as output.

[0044] Among them, the question text set is a set of pre-acquired existing scientific research question texts. The sample input sequence and the sample output sequence are obtained by processing the scientific research question texts in the question text set. For any scientific research question text, the keywords in the scientific research question text are retained, and the remaining text blocks are replaced with masking codes to obtain the sample input sequence. The keywords in the scientific research question text are masked, and other text blocks are retained to obtain the sample output sequence.

[0045] It is understandable that in natural language processing, a method of masking keywords in a text may be to replace the keywords with a spacing code [SEP] or other markers or placeholders having the same function.

[0046] The specific type of the pre-trained language model can be determined according to actual needs, including but not limited to Bidirectional Encoder Representations from Transformers (BERT), Bidirectional and Auto-Regressive Transformers (BART), and Generative Pre-trained Transformer (GPT), etc. The method of fine-tuning the pre-trained model can be determined according to actual needs.

[0047] Step S103: For each output sequence, fill the target keywords between the text blocks in the output sequence to obtain the candidate question text corresponding to the output sequence.

[0048] Specifically, after obtaining at least one output sequence output by the scientific research question text generation model, since the output sequence only includes the text blocks covered by the cover codes in the predicted input sequence, the output sequence does not include the target keywords.

[0049] Therefore, in step S103, for each output sequence, it is necessary to fill the target keywords between the text blocks in the output sequence to obtain the candidate question text corresponding to the output sequence.

[0050] It is understandable that when the number of target keywords is more than one, the arrangement order between the target keywords needs to be considered. According to the preset rules adopted when constructing the input sequence, the target keywords are filled in the corresponding positions between the text blocks in the output sequence according to the arrangement order between the target keywords to obtain the candidate question text corresponding to the output sequence.

[0051] Step S104, for each candidate question text, obtain the novelty of the candidate question text, the novelty is positively correlated with the semantic distance between the candidate question text and the existing question text, and the existing question text is the existing scientific research question text that contains the target keyword in the question text set.

[0052] Specifically, the goal of the disclosed embodiment is to obtain a new scientific research question text that is different from the existing scientific research question text. However, by generating an output sequence and determining a candidate question text through a scientific research question text generation model, it can only be ensured that the generated candidate question text contains the target keyword, but it is impossible to determine the novelty of the generated candidate question text, that is, it is impossible to determine whether the candidate question text is different from the existing scientific research question text or the difference from the existing scientific research question text.

[0053] Therefore, the embodiment of the present disclosure sets a novelty that is positively correlated with the semantic distance between the candidate question text and the existing question text, and uses the novelty to measure the degree of difference between the candidate question text and the existing scientific research question text. The specific calculation formula of the novelty can be determined according to actual needs.

[0054] Based on at least one target keyword determined in step S101, the existing scientific research question texts contained in the question text set are screened, and the existing scientific research question texts containing the target keyword are used as existing question texts. In step S104, for each candidate question text, the novelty of each candidate question text is calculated according to a specific calculation formula for novelty that is preset.

[0055] It is understandable that there may be more than one existing question text. When there are multiple existing question texts, the novelty can be used to measure the average of the semantic distances between the candidate question text and each existing question text. Step S105, according to the novelty of each candidate question text, determine the target scientific research question text from each candidate question text.

[0056] Specifically, after obtaining the novelty of each candidate question text, in step S105, according to the novelty of each candidate question text, the candidate question text with higher novelty is screened out from the candidate question texts as the target teaching and scientific research question text. The specific screening method can be determined according to actual needs.

[0057] For example, candidate question texts whose novelty is greater than a preset novelty threshold can be screened out as target scientific research question texts, or the candidate question texts can be sorted in descending order of novelty, and the top N or top M% of the candidate question texts can be selected as target scientific research question texts.

[0058] The technical solution provided by the embodiment of the present disclosure constructs an input sequence according to target keywords, and inputs the input sequence into a scientific research question text generation model to obtain an output sequence, fills the output sequence with target keywords to obtain candidate question texts, reflects the semantic distance between the candidate question texts and the existing question texts with the novelty of the candidate question texts, screens out the target scientific research question texts from each candidate question text, and can generate a new target scientific research question text that is different from the existing scientific research question texts through the target keywords, so that researchers can conduct innovative research based on the target scientific research question texts.

[0059] In a possible implementation, for each candidate question text, the novelty of the candidate question text is obtained, including: For each candidate question text, calculate the semantic distance between the candidate question text and each existing question text; The novelty of the candidate question text is obtained according to the semantic distance between the candidate text and each existing question text.

[0060] Specifically, for each candidate question text, the novelty of the candidate question text needs to be calculated. For the target keyword determined in the embodiment of the present disclosure, there may be several existing question texts containing the target keyword in the constructed question text set, so an average semantic distance method is used to represent the novelty of the candidate question text.

[0061] Taking any candidate question text as an example, the specific calculation method of novelty is explained as follows: The candidate question text generated by using the target keyword k is denoted as Sk. There are n existing question texts containing the target keyword in the question text set, which are denoted as S1, S2, ..., Sn respectively.

[0062] For the candidate question text Sk, the semantic distance dist(Sk,Si) between the candidate question text Sk and any existing question text Si is calculated.

[0063] It can be understood that the novelty of the candidate question text reflects the overall difference between the candidate question text and the existing question texts. After obtaining the semantic distance dist(Sk,Si) between the candidate question text Sk and any existing question text Si, it is necessary to determine the novelty of the candidate question text Sk based on each dist(Sk,Si).

[0064] Methods for determining novelty include, but are not limited to, taking the minimum value of each dist(Sk, Si) as the novelty, or setting corresponding weights to calculate the novelty in a weighted fusion manner, etc.

[0065] For example, the weight of each dist(Sk,Si) can be set to be the same, and the average of each semantic distance can be calculated, and the average can be used as the novelty(Sk) between the candidate question text and the existing question text.

[0066] Then the calculation formula of novelty(Sk) of the candidate question text Sk is:

[0067] Where novelty(Sk) is the novelty of the candidate question text Sk, and dist(Sk,Si) represents the semantic distance between the candidate question text Sk and the existing question text Si.

[0068] Among them, semantic distance can be represented by text similarity and its transformation forms, such as term frequency-inverse document frequency (TF-IDF), cosine similarity, etc., which can be determined according to actual needs.

[0069] In addition, different weights can be set for each dist(Sk,Si). For example, different weights can be set for each dist(Sk,Si) based on the publication time of the corresponding technical text of the existing problem text. The weight of the text published within the past five years is set to 1, and the weight of the text published 5-10 years from the current time is set to 0.8.

[0070] In practical applications, the Sentence-BERT (SBERT) model of the sentence transformers (a Python library for sentence, text, and image embedding) framework can be used. The SBERT model is used to obtain sentence-level vector representations and provides sentence or text embeddings in more than 100 languages. It has been applied to semantic text similarity, semantic search, or interpretation mining and has achieved good results.

[0071] The candidate question texts generated by the scientific research question generation model may have poor novelty. In order to provide users with more novel question texts, the candidate question texts are screened by calculating the novelty.

[0072] Figure 2 A novelty calculation method flow chart provided in an embodiment of the present disclosure is shown in FIG. Figure 2As shown in the figure, for a keyword k given by the user, multiple (e.g., 5) candidate question texts Sk are generated based on the scientific research question text generation model. The given target keyword k is used to retrieve existing questions that have appeared in the past in the constructed question text set (i.e., retrieve existing question texts). For example, if 3 existing question texts are retrieved, the novelty calculation formula is used to calculate the novelty corresponding to each candidate question text Sk.

[0073] The candidate question text with the highest novelty is selected as feedback to the user as the recommended target scientific research question text. It is also possible to select multiple target scientific research question texts from each candidate question text and provide them to the user according to actual needs.

[0074] The technical solution provided by the embodiment of the present disclosure reflects the semantic distance between the candidate question text and the existing question text by setting the novelty. By calculating the novelty, it is possible to efficiently determine whether the generated candidate question text is novel compared with the existing question text, and screen out the candidate question texts with higher novelty as the target scientific research question texts to feed back to the user, thereby satisfying the user's demand for obtaining novel scientific research question texts.

[0075] In one possible implementation, the scientific research question text generation model is generated in the following way: For each scientific research question text in the question text set, extract at least one sample keyword in the scientific research question text; Replace the text blocks except sample keywords in the scientific research question text with masking codes to obtain a sample input sequence, and replace the sample keywords in the scientific research question text with interval codes to obtain a sample output sequence; For each training batch, the sample input sequence of scientific research question text is taken as input, and the sample output sequence corresponding to the sample input sequence is taken as output. With the goal of minimizing the difference between the predicted output sequence of the pre-trained language model and the sample output sequence, the parameters of the pre-trained language model are fine-tuned to obtain the scientific research question text generation model.

[0076] Specifically, before training the scientific research question text generation model, it is necessary to construct a sample input sequence and a sample output sequence based on the question text set, and the question text set includes several existing scientific research question texts.

[0077] For each scientific research question text in the question text set, at least one sample keyword is extracted from the scientific research question text, the sample keywords in the scientific research question text are retained, and the text blocks except the sample keywords are replaced with masking codes to obtain a sample input sequence, and the sample keywords in the scientific research question text are replaced with interval codes, and the rest are retained to obtain a sample output sequence.

[0078] It can be understood that the preset rules used in constructing sample input sequences and sample output sequences are consistent with the rules used in constructing input sequences when the scientific research question text generation model is applied. Therefore, the preset rules are uniformly described in the following way using keywords, input sequences, and output sequences to illustrate examples.

[0079] For example, taking [MASK] as the masking code, [SEP] as the interval code, and the number of keywords limited to 1-3, the preset rules for constructing input sequences and output sequences by combining three types of keywords are shown in Table 1 below: Table 1

[0080] Among them, K1-K3 represent keywords, S1-S4 represent the text blocks covered by the masking code, and the last interval code [SEP] in the output sequence is used to indicate the end of the sentence.

[0081] Figure 3 A schematic diagram of a training data set construction process provided by an embodiment of the present disclosure, such as Figure 3 As shown, taking any scientific research question text as an example, the scientific research question text is segmented, and it is determined whether the scientific research question text includes the keywords in the keyword library.

[0082] If it is determined that the scientific research question text does not include keywords, the processing is terminated and the scientific research and technology text to be processed is selected. If it is determined that the scientific research and technology text includes keywords, the input sequence and output sequence are constructed according to the number of keywords in the keyword combination using corresponding preset rules to obtain the sample input sequence and sample output sequence corresponding to the scientific research question text.

[0083] For example, for the scientific research question text "Aiming to explore the spatiotemporal characteristics of WeChat users' sharing behavior, and provide reference for revealing the evolution law of information sharing trajectories and social network structures among users", its keyword combination is determined to be two keywords "WeChat users" and "spatiotemporal characteristics". Correspondingly, the input sequence is constructed as "[MASK] WeChat users [MASK] spatiotemporal characteristics [MASK]", and the output sequence is constructed as "Aiming to explore [SEP] sharing behavior [SEP], and provide reference for revealing the evolution law of information sharing trajectories and social network structures among users [SEP]".

[0084] It can be understood that the above preset rules are only used as a specific example to illustrate the embodiments of the present disclosure. In actual application, the number of keywords in the keyword combination, and the arrangement of keywords, masking codes and interval codes in the input sequence and output sequence can be determined according to actual needs.

[0085] The sample input sequence and its corresponding sample output sequence are combined to form a piece of data to obtain a training data set. Based on the training data set, the scientific research question text generation model is trained in batches.

[0086] The training data set is divided into multiple training batches. For each training batch, the sample input sequence of the scientific research question text is taken as input, and the sample output sequence corresponding to the sample input sequence is taken as output. With the goal of minimizing the difference between the predicted output sequence and the sample output sequence of the pre-trained language model, the parameters of the pre-trained language model are fine-tuned to obtain a scientific research question text generation model.

[0087] It is understandable that compared with the masked training of traditional pre-trained language models (such as BERT, BART), the scientific research question text generation in the disclosed embodiment is more challenging and difficult. Masked training is a text filling task that requires predicting the missing word or text block given a missing word or text block.

[0088] Generally speaking, the text filling task of the small model is usually to randomly mask about 15% of the words or text blocks, while the scientific research question text generation generally only provides a small number (such as 1-3) of keywords. The unmasked part of the text is very short and may only account for about 15% of the entire text, while the part that needs to be predicted far exceeds the length of the keyword text, usually accounting for about 85% of the entire text. It is impossible to directly use the small model masked fine-tuning training to obtain a scientific research question text generation model. The large model can better solve the scientific research question generation problem defined in the present invention because it obtains extensive knowledge from a large amount of data.

[0089] It should be noted that when fine-tuning the parameters of the pre-trained language model, the specific type of the pre-trained language model used and the specific method of fine-tuning can be determined according to actual needs.

[0090] For example, based on the training data set, the prompt instruction, sample input sequence, and sample output sequence are combined to form a training data, and then the training data is combined in batches to form the SFT batch data required for supervised fine-tuning (SFT) of the large model. In the text generation scenario, the sample input sequence is the basis for constructing the instruction data, and the sample output sequence is the text that the model is expected to generate based on the instruction data.

[0091] In the embodiment of the present disclosure, after a large language model (LLM) is selected as the pre-trained language model, SFT batch is used to perform model fine-tuning training. The selection of the pre-trained language model can be determined according to the processor device situation and the application scenario requirements.

[0092] The core task of large model fine-tuning is to use the constructed training data to fine-tune the selected pre-trained language model to form a text generation model for scientific research problems. Since the number of parameters of large models (large pre-trained models) is very large, full-scale fine-tuning has high computing requirements, making it very difficult to use full-scale fine-tuning.

[0093] In order to solve the problem that downstream users are limited by machine performance and capacity, the disclosed embodiment adopts the Parameter-Efficient Fine-Tuning (PEFT) technology, and uses the Low-Rank Adaptation (LoRA) method to efficiently fine-tune the pre-trained language model to obtain a scientific research question text generation model.

[0094] Among the main PEFT methods, the adapter method has the problem of inference latency because it adds additional model parameters, and the soft hint method has the problem of greatly increased computational complexity in the inference phase because it increases the prefix sequence length. The LoRA method is used in the construction of the scientific research question text generation model, which can freeze the weight parameters of the pre-trained large model, add additional side networks to the fully connected layer, and train two low-rank matrices with very small parameters to approximate the updated values ​​of the fully connected layer parameters in domain adaptation. Not only does it significantly reduce the training cost, but it can also achieve similar results to full fine-tuning.

[0095] Compared with the controlled text generation technology in the prior art, the embodiment of the present disclosure does not limit the ratio of text length to constraint words (keywords) when constructing training samples. In comparison, less input information is provided to the pre-training model, and text generation is more difficult. It can make full use of the language understanding, reasoning and creative capabilities of the large model, propose (generate) new scientific research problems based on historical data of scientific and technological literature, apply them to scientific research topic selection, assist scientific researchers in academic innovation, and can also be applied to teaching and learning.

[0096] The technical solution provided by the embodiment of the present disclosure constructs a sample input sequence and a sample output sequence, and in a batch training manner, takes the sample input sequence as input, takes the sample output sequence corresponding to the sample input sequence as output, and fine-tunes the parameters of the pre-trained language model to obtain a scientific research question text generation model, so that the scientific research question text generation model can quickly output the corresponding output sequence according to the input sequence corresponding to the target keyword, so as to obtain a candidate question text containing the target keyword. The powerful language understanding and reasoning ability of the pre-trained language model is fully utilized. Compared with the model trained in the traditional way, the generated text is more fluent, and the generated candidate question text contains the target keywords, making the generated text more comprehensible.

[0097] In a possible implementation, each text block in the output sequence also includes a spacing code; After obtaining at least one output sequence output by the scientific research question text generation model, including: For each output sequence, check whether the number of spacing codes between text blocks in the output sequence matches the number of target keywords; If it is determined that the number of interval codes does not match the number of target keywords, the output sequence is deleted.

[0098] Specifically, after obtaining the output sequence of the scientific research question text generation model, it is necessary to check whether the output sequence meets the requirements, that is, to check whether the number of interval codes between each text block in the output sequence is consistent with the number of target keywords.

[0099] The output sequence also includes spacing codes between each text block. For each output sequence, if the output sequence meets the requirements, the number of spacing codes should match the number of target keywords. Check whether the number of spacing codes matches the number of target keywords. If it is determined that the number of spacing codes does not match the number of target keywords, delete the output sequence, otherwise retain the output sequence.

[0100] It is understandable that the number of spacing codes in the output sequence is not necessarily the same as the number of target keywords. For example, when the spacing code is [SEP], the scientific research question text generation model can generate a text filled with [SEP] tags based on the keywords input by the user. The text is divided into multiple text blocks based on [SEP]. In addition to the spacing codes between each text block, there are also spacing codes at the end of the text.

[0101] Therefore, when checking whether the output sequence meets the requirements, after removing the interval code [SEP] at the end of the output sequence text, determine whether the number of remaining interval codes [SEP] in the output sequence is consistent with the number of target keywords. If not, it is considered that it does not meet the requirements, and the scientific research question text generation model is requested to generate a new output sequence again until it meets the requirements. In the output sequence that meets the requirements, the interval codes [SEP] between each text block are replaced with the target keywords one by one in the order of each target keyword, and the text after replacing the target keywords is used as the candidate question text.

[0102] In order to improve the defect of the text generation method with vocabulary constraints in the prior art that it is difficult to ensure that all constrained words appear in the generated text, the embodiment of the present disclosure constructs a scientific research problem text generation model based on text block prediction, by predicting the missing text blocks between given constraint words (keywords), and then filling the constraint words into the corresponding positions between the text blocks. In theory, it can make the generated text contain 100% of all the input constraint words, while maintaining the advantage of the fast generation speed of the end-to-end method.

[0103] However, in actual applications, it is found that the problem of not being able to include all keywords still occurs. For example, when the input target keywords are "current situation" and "evolution process", the output sequence is "sorting out the research in the field of intelligence analysis in my country [SEP], in order to have certain reference significance for future research in this field [SEP]", that is, based on this output sequence, it can be determined that the text after replacing the target keywords is "sorting out the current situation of research in the field of intelligence analysis in my country, in order to have certain reference significance for future research in this field".

[0104] In the above example, since only one [SEP] tag that can be filled with the target keyword appears in the generated output sequence, of the two target keywords, only "current situation" is included in the generated text, while the other target keyword "evolutionary process" cannot be included in the generated text, which is inconsistent with the situation where there are actually two target keywords.

[0105] In order to solve the above problems, the scientific research question text generation model can be used to generate output sequences multiple times. For each output sequence, the above method is used to determine whether the number of interval codes matches the number of target keywords, until an output sequence in which the number of interval codes matches the number of target keywords is determined. Alternatively, several output sequences are generated. For each output sequence, if it is determined that the number of interval codes does not match the number of target keywords, the output sequence is deleted, otherwise the output sequence is retained, and several output sequences that meet the requirements are obtained.

[0106] The technical solution provided by the disclosed embodiment increases a checking step to check whether the number of spacing codes between text blocks in the output sequence matches the number of target keywords, deletes the output sequences in which the number of spacing codes does not match the number of target keywords, and ensures that the generated output sequence is grammatically correct and logically consistent with the expected structure after the spacing codes are replaced with the target keywords, thereby improving the quality and reliability of the candidate question text generation process, effectively eliminating inaccurate outputs that may be generated by the scientific research question text generation model when processing complex language structures and long sequences, and ensuring that the text generated based on the output sequence can 100% contain all the input target keywords while maintaining the advantage of end-to-end fast text generation speed.

[0107] In a possible implementation, the question text set is obtained in the following way: Obtaining a preset text set and a question sentence set, wherein the preset text set includes a plurality of technical texts, and the question sentence set includes a plurality of question sentence texts reflecting the research purpose of the technical texts; For each technical text in the preset text set, extract keywords from the technical text and build a keyword library; For each question sentence text in the question sentence set, perform word segmentation processing on the question sentence text to determine whether the question sentence text contains keywords in the keyword library; The question sentence texts containing keywords are used as scientific research question texts to construct a question text set.

[0108] Specifically, before constructing a training data set for a scientific research question text generation model, it is necessary to determine a question text set, which includes several existing scientific research question texts.

[0109] A preset text set and a question sentence set corresponding to the preset text set are obtained, wherein the preset text set includes a plurality of technical texts, and the corresponding question sentence set includes a plurality of question sentence texts reflecting the research purpose of the technical texts in the preset text set.

[0110] It is understandable that technical texts can be texts used to convey technical information in different fields, such as paper texts, project fund texts, book texts or patent texts, etc. The corresponding text types may include: abstract text, main text and conclusion text, etc.

[0111] The problem sentence text is a sentence text extracted from a technical text and represents a scientific research problem. A problem sentence set is constructed based on the problem sentence text extracted from each technical text in a preset text set.

[0112] For example, Figure 4 A schematic diagram of a problem sentence set construction process provided by an embodiment of the present disclosure, such as Figure 4As shown, the locations of research questions in technical texts include title, abstract and introduction. There are two schemes for extracting question sentences from technical texts. Scheme 1 is to extract question sentence text from the abstract, and scheme 2 is to extract question sentence text from the introduction.

[0113] When extracting sentence text from an abstract using Scheme 1, the abstract is divided into structured abstracts and unstructured abstracts based on whether the abstract organizes and presents information in a fixed format or template. For structured abstracts, the purpose move information can be identified. The purpose move of an abstract refers to the sentence or paragraph that clearly states the purpose of the research or the purpose of the article when writing an academic abstract. The sentence text in the purpose move is extracted as the problem sentence. For unstructured abstracts, a summary sentence classifier needs to be built in advance to distinguish problem sentences from non-problem sentences, and the sentence text marked as a problem by the binary classifier is extracted as the problem sentence text.

[0114] When taking Scheme 2 to extract sentence text from the introduction, it is necessary to obtain the text of the introduction paragraph. Considering that some technical texts have tags such as "introduction" and "preface", but some technical texts do not have these chapter tags, but the introduction is composed of several paragraphs at the beginning of the article, it is necessary to first determine the introduction paragraph from the technical text through the rules for determining the introduction paragraph, and then use the machine learning algorithm to construct a problem sentence classifier to distinguish between problem sentences and non-problem sentences, so as to realize the extraction of problem sentence text in the introduction.

[0115] Compared with the prior art method of directly extracting keywords or phrases from the title, and extracting a question word or phrase from the purpose language of the title and abstract as a research question, the method of extracting the question sentence text provided by the embodiment of the present disclosure can completely extract complete sentences that reflect the research purpose, rather than phrases or keywords, and can better reflect the research purpose of the technical text.

[0116] In addition, the prior art method of directly extracting problem sentences from the introduction has a poor extraction effect due to the great differences in the narrative process of the problem description information in ordinary texts, and the obtained technical problems are difficult to reflect the research purpose of the technical text. The method for extracting the problem sentence text provided by the embodiment of the present disclosure combines the determination rules of the introduction paragraphs and the problem sentence classifier to realize the method of extracting the problem sentence text in the introduction, which can improve the extraction effect and extract more accurate problem sentence text more easily.

[0117] For each technical text in the preset text set, technical terms in the technical text are extracted as keywords to construct a keyword library. It can be understood that the selection of technical terms can be determined based on the technical field of the technical text.

[0118] Based on the keyword library, for each question sentence text in the question sentence set, call the word segmentation tool (such as jieba) to perform word segmentation on the question sentence text to determine whether the question sentence text contains the keywords in the keyword library.

[0119] For each question sentence text, if the question sentence text does not include the keywords in the keyword library, the processing of the question sentence text is terminated. If the question sentence text includes the keywords in the keyword library, the question sentence text is used as a scientific research question text. After completing the processing of each question sentence text, all scientific research question texts are obtained to construct a question text set.

[0120] It is understandable that the above method of processing question sentence texts can be to process one by one, after processing the previous question sentence text, continue processing the next question sentence text, or it can be a batch processing method, processing several question sentence texts at the same time.

[0121] The technical solution provided by the embodiment of the present disclosure extracts specific technical terms as keywords from technical texts and constructs a keyword library, and screens question sentence texts based on the keyword library to screen out question sentence texts including keywords as scientific research question texts. This ensures that the acquired scientific research question texts can reflect the research purpose of the technical texts, so that sample input sequence and sample output sequence scientific research questions can be constructed based on the question text set as the basis for model training, so that the scientific research question text generation model can generate a more targeted and accurate output sequence based on the input sequence.

[0122] In a possible implementation, the target keyword is obtained by: Obtaining at least one first keyword input by a user; Searching the keyword library to determine whether the keyword library includes a second keyword that matches the first keyword; If it is determined that the second keyword exists in the keyword library, the second keyword is used as the target keyword; if it is determined that the second keyword does not exist in the keyword library, a prompt message is sent to the user, and the prompt message is used to instruct the user to re-enter the keyword.

[0123] Specifically, after determining the keyword library, the scientific research question text containing the keywords in the keyword library is used as the basis for constructing sample input sequences and sample output sequences during model training. This enables the trained scientific research question text generation model to learn more semantic understanding related to the keywords in the keyword library and be more accurate when processing input sequences including keywords in the keyword library.

[0124] Figure 5 A schematic diagram of an output sequence acquisition process provided by an embodiment of the present disclosure, such as Figure 5As shown, when applying the scientific research question text generation method provided by the embodiment of the present disclosure, the user can enter one or more keywords of interest as needed, and the keyword entered by the user is recorded as the first keyword.

[0125] At least one first keyword input by the user is obtained, and each first keyword input by the user is searched one by one in the keyword library.

[0126] That is, a search is performed in the keyword library to determine whether the keyword library includes a second keyword that matches the first keyword. It is understandable that when the first keyword input by the user and the second keyword in the keyword library are different expressions of the same meaning, it can also be considered that the keyword library includes the second keyword that matches the first keyword.

[0127] For each first keyword input by the user, if it is determined that there is a second keyword matching the first keyword in the keyword library, the second keyword will be used as the target keyword. If it is determined that the second keyword does not exist in the keyword library, a prompt message will be sent to the user, and the prompt message is used to instruct the user to re-enter the keyword.

[0128] It is understandable that the first keyword input by the user may be one or more. When the second keyword exists in some of the first keywords input by the user and does not exist in others, a prompt message may be sent to the user, prompting that some of the first keywords need to be re-entered.

[0129] After determining the second keyword that matches the first keyword provided by the user as the target keyword, the input data of the model can be constructed together with the prompt instruction based on the input sequence obtained based on the target keyword, and the output sequence can be quickly generated based on the trained scientific research question text generation model.

[0130] The output sequence generated by the scientific research question text generation model is checked to determine whether the output sequence meets the requirements. If it is determined that it does not meet the requirements, the scientific research question text generation model is enabled to generate a new output sequence. If it is determined that it meets the requirements, the output sequence is obtained. The specific checking method is described above and will not be repeated here.

[0131] It can be understood that for the target keywords input by the user, a new scientific research question text can be output, or new scientific research question texts that meet more quantity requirements can be generated by calling the model multiple times according to user needs. This is highly efficient and far exceeds the speed at which new questions are raised by humans.

[0132] The technical solution provided by the embodiment of the present disclosure makes the generated text more understandable by including keywords specified by the user in the generated text and ensuring that the keywords input by the user are keywords learned during model training.

[0133] The scientific research problem generation (SRPG) method provided in the embodiments of the present disclosure refers to automatically generating a new scientific research problem that may have research value based on learning about the problems contained in the existing technical text.

[0134] Figure 6 A schematic diagram of a method for generating a scientific research question text provided in an embodiment of the present disclosure is shown in FIG. Figure 6 As shown, each step of the SRPG method provided by the embodiment of the present disclosure is described in combination with a specific example.

[0135] For each technical text in the preset text set, the question sentence text is obtained by question sentence extraction to construct a question sentence set, and the technical terms in the technical text are extracted to construct a keyword library. Further, for each question sentence text in the question sentence set, a question text set is constructed based on whether the question sentence text includes keywords.

[0136] For each scientific research question text in the question text set, as well as the keywords in the scientific research question text, a sample input sequence and a sample output sequence of the scientific research question text are constructed accordingly to build the training data of the model, and a large model fine-tuning method is adopted to obtain the scientific research question text generation model.

[0137] Obtain target keywords input by the user and matched with the keyword library, construct an input sequence based on the target keywords as the input of the scientific research question text generation model, obtain the output sequence output by the scientific research question text generation model, check the output sequence, obtain the output sequence that meets the requirements and replace the interval code with the target keyword, and obtain the candidate question text as the text generation result.

[0138] The text generation results are processed, and the corresponding novelty of each candidate question text is calculated. The novelty is used as the basis for screening the candidate question texts, and the target scientific research question text is selected from each candidate question text and output to the user.

[0139] The SRPG method provided by the embodiments of the present disclosure can be applied to the field of scientific research innovation or academic innovation to assist researchers in selecting topics, and can also be applied to teaching or learning. Using the constructed scientific research question text generation model, users can generate new questions that are different from existing questions based on keywords, providing a new way to inspire researchers' thinking, assisting researchers in selecting appropriate research questions, and promoting scientific research innovation.

[0140] The SRPG method provided by the embodiment of the present disclosure has the following advantages: 1. Fast text generation speed: Using end-to-end text generation technology, after the model training is completed, it can quickly output text containing constraint keywords based on the input.

[0141] 2. The generated text is highly comprehensible: The powerful language comprehension and reasoning capabilities of the large model are fully utilized. Compared with the traditional pre-trained model (small model), the generated text is more fluent and contains user-specified keywords, making the generated text more comprehensible.

[0142] 3. It can reduce the impact of large model hallucinations: Although the creativity of large models makes it easy for computers to generate new texts, due to the unexplainability of generative artificial intelligence, the problems generated by computers may be texts with poor fluency and coherence, which are difficult to understand and cannot be explained, and even "hallucinations" may occur.

[0143] The SRPG method provided in the embodiment of the present disclosure can better ensure that the keywords provided by the user appear in the generated scientific research questions by enabling the model to predict the text blocks in the input sequence. These keywords will provide guidance for researchers to understand the problems, allowing researchers to better understand the generated problems, thereby reducing the interference of unsmooth, incoherent generated texts or even "hallucination" texts.

[0144] 4. The speed of raising new questions is fast, the quantity is large, and the efficiency is high: After the user provides keywords, the trained scientific research question generation model can quickly generate a new question. It can also generate new questions that meet more quantity requirements through multiple model calls according to user needs. It is highly efficient, far exceeding the speed at which humans raise new questions. It can also efficiently determine the novelty of the generated questions, meeting the user's needs for novel questions.

[0145] Compared with ordinary controlled text generation technology, the SRPG method provided by the embodiment of the present disclosure is a vocabulary-controlled end-to-end generation method. Compared with the text generation method of searching the text space, it has the characteristics of fast generation speed. Compared with ordinary end-to-end generation, it can better ensure that the generated text contains the input keywords.

[0146] Compared with AQG technology, although both can generate questions related to the input content and grammatically fluent based on the input text, there are obvious differences as follows: 1. The question text generated by AQG technology remains the same or similar to the input text, while the question text generated by SRPG method is quite different from the reference text to reflect novelty.

[0147] 2. AQG technology constructs a question expressed as a question sentence based on the input text and the target answer, with the aim of making the answer given by the user appear in the known text. The SRPG method starts from existing questions or keywords to raise a different question that does not appear in the literature, and does not require the answer to be in the known text.

[0148] 3. The answers to the questions generated by AQG technology are clear and solvable (the results can be obtained from the known text), while the answers to the questions generated by SRPG method are unknown and unsolved.

[0149] 4. The text of the questions generated by AQG technology is unambiguous and easy for users to understand. The purpose is to help users understand the content of the text. However, the text generated by the SRPG method may be ambiguous or even difficult for users to understand. The purpose is to inspire researchers.

[0150] It can be understood that the above detailed description of the technical effects of the present invention is only intended to facilitate the understanding of the present invention and to distinguish the SRPG method provided by the embodiment of the present disclosure, but does not have any limiting effect on it.

[0151] Figure 7 A schematic diagram of a structure of a scientific research question text generation device provided by an embodiment of the present disclosure, such as Figure 7 As shown, the scientific research question text generating device 700 includes: An input sequence construction module 701 is used to construct an input sequence according to at least one target keyword, wherein the input sequence includes at least one target keyword and a plurality of masking codes, wherein the first and last portions of the at least one target keyword are respectively adjacent to a masking code; An output sequence acquisition module 702 is used to input an input sequence into a pre-trained scientific research question text generation model, and output at least one output sequence according to the scientific research question text generation model, wherein the output sequence includes a text block corresponding to each masking code, and the scientific research question text generation model is obtained by retraining a pre-trained language model through a sample input sequence and a sample output sequence, and both the sample input sequence and the sample output sequence are obtained by processing the scientific research question text in the question text set; An output sequence processing module 703 is used to fill target keywords between text blocks in each output sequence to obtain candidate question texts corresponding to the output sequence; A novelty acquisition module 704 is used to obtain the novelty of each candidate question text, wherein the novelty is positively correlated with the semantic distance between the candidate question text and an existing question text, wherein the existing question text is a scientific research question text that contains the target keyword in the question text set; The question text determination module 705 is used to determine the target scientific research question text from each candidate question text according to the novelty of each candidate question text.

[0152] In a possible implementation, the novelty acquisition module is used to: For each candidate question text, calculate the semantic distance between the candidate question text and each existing question text; The novelty of the candidate question text is obtained according to the semantic distance between the candidate text and each existing question text.

[0153] In one possible implementation, the scientific research question text generation model is generated in the following way: For each scientific research question text in the question text set, extract at least one sample keyword in the scientific research question text; Replace the text blocks except sample keywords in the scientific research question text with masking codes to obtain a sample input sequence, and replace the sample keywords in the scientific research question text with interval codes to obtain a sample output sequence; For each training batch, the sample input sequence of scientific research question text is taken as input, and the sample output sequence corresponding to the sample input sequence is taken as output. With the goal of minimizing the difference between the predicted output sequence of the pre-trained language model and the sample output sequence, the parameters of the pre-trained language model are fine-tuned to obtain the scientific research question text generation model.

[0154] In a possible implementation, each text block in the output sequence also includes a spacing code; After obtaining at least one output sequence output by the scientific research question text generation model, including: For each output sequence, check whether the number of spacing codes between text blocks in the output sequence matches the number of target keywords; If it is determined that the number of interval codes does not match the number of target keywords, the output sequence is deleted.

[0155] In a possible implementation, the question text set is obtained in the following way: Obtaining a preset text set and a question sentence set, wherein the preset text set includes a plurality of technical texts, and the question sentence set includes a plurality of question sentence texts reflecting the research purpose of the technical texts; For each technical text in the preset text set, extract keywords from the technical text and build a keyword library; For each question sentence text in the question sentence set, perform word segmentation processing on the question sentence text to determine whether the question sentence text contains keywords in the keyword library; The question sentence texts containing keywords are used as scientific research question texts to construct a question text set.

[0156] In a possible implementation, the target keyword is obtained by: Obtaining at least one first keyword input by a user; Searching the keyword library to determine whether the keyword library includes a second keyword that matches the first keyword; If it is determined that the second keyword exists in the keyword library, the second keyword is used as the target keyword; if it is determined that the second keyword does not exist in the keyword library, a prompt message is sent to the user, and the prompt message is used to instruct the user to re-enter the keyword.

[0157] The device of the embodiments of the present disclosure can execute the method provided by the embodiments of the present disclosure, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present disclosure correspond to the steps in the method of each embodiment of the present disclosure. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0158] In addition, in the embodiments of the present disclosure, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0159] An embodiment of the present disclosure provides an electronic device (computer device / equipment / system), including a memory, a processor, and a computer program stored in the memory, and the processor executes the above-mentioned computer program to implement the steps of the method provided in any optional embodiment of the present disclosure and achieve corresponding technical effects.

[0160] In an optional embodiment, an electronic device is provided. Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the electronic device 800 includes: a processor 801 and a memory 803. The processor 801 and the memory 803 are connected, such as through a bus 802. Optionally, the electronic device 800 may also include a transceiver 804, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 804 is not limited to one, and the structure of the electronic device 800 does not constitute a limitation on the embodiments of the present disclosure.

[0161] The processor 801 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor 801 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0162] The bus 802 may include a path to transmit information between the above components. The bus 802 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 802 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0163] The memory 803 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.

[0164] The memory 803 is used to store the computer program for executing the embodiment of the present disclosure, and the execution is controlled by the processor 801. The processor 801 is used to execute the computer program stored in the memory 803 to implement the steps shown in the above method embodiment.

[0165] The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable devices, etc., and fixed terminals such as digital TVs, desktop computers, etc.

[0166] An embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.

[0167] The embodiments of the present disclosure also provide a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiments when executed by a processor.

[0168] It should be noted that the computer-readable storage medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0169] In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0170] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0171] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than that shown or described in the text.

[0172] It should be understood that, although the flowchart of the embodiment of the present disclosure indicates each operation step by arrows, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present disclosure, the implementation steps in each flowchart can be executed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage in these sub-steps or stages can also be executed at different times. In scenarios with different execution times, the execution order of these sub-steps or stages can be flexibly configured according to demand, and the embodiment of the present disclosure does not limit this.

[0173] The above is only an optional implementation method for some implementation scenarios of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the scheme of the present disclosure, other similar implementation methods based on the technical ideas of the present disclosure are also within the protection scope of the embodiments of the present disclosure.

Claims

1. A method for generating scientific research question text, characterized in that: include: According to at least one target keyword, construct an input sequence, wherein the input sequence includes the at least one target keyword and a plurality of masking codes, wherein the beginning and the end of the at least one target keyword are respectively adjacent to a masking code; Inputting the input sequence into a pre-trained scientific research question text generation model, outputting at least one output sequence according to the scientific research question text generation model, wherein the output sequence includes a text block corresponding to each masking code, and the scientific research question text generation model is obtained by retraining a pre-trained language model through a sample input sequence and a sample output sequence, wherein the sample input sequence and the sample output sequence are both obtained by processing scientific research question texts in a question text set; For each output sequence, fill the target keyword between each text block in the output sequence to obtain a candidate question text corresponding to the output sequence; For each candidate question text, obtain the novelty of the candidate question text, wherein the novelty is positively correlated with the semantic distance between the candidate question text and an existing question text, wherein the existing question text is an existing scientific research question text that contains the target keyword in the question text set; According to the novelty of each candidate question text, the target scientific research question text is determined from among the candidate question texts.

2. The method for generating scientific research question text according to claim 1, characterized in that: For each candidate question text, obtaining the novelty of the candidate question text includes: For each candidate question text, calculating the semantic distance between the candidate question text and each existing question text; The novelty of the candidate question text is obtained according to the semantic distance between the candidate text and each existing question text.

3. The method for generating scientific research question text according to claim 1, characterized in that: The scientific research question text generation model is generated in the following way: For each scientific research question text in the question text set, extract at least one sample keyword in the scientific research question text; Replace the text blocks except the sample keywords in the scientific research question text with masking codes to obtain a sample input sequence, and replace the sample keywords in the scientific research question text with interval codes to obtain a sample output sequence; For each training batch, the sample input sequence of the scientific research question text is taken as input, and the sample output sequence corresponding to the sample input sequence is taken as output. With the goal of minimizing the difference between the predicted output sequence of the pre-trained language model and the sample output sequence, the parameters of the pre-trained language model are fine-tuned to obtain the scientific research question text generation model.

4. The method for generating scientific research question text according to claim 3, characterized in that: The output sequence also includes interval codes between each text block; After obtaining at least one output sequence output by the scientific research question text generation model, the method further comprises: For each output sequence, checking whether the number of spacing codes between the text blocks in the output sequence matches the number of target keywords; If it is determined that the number of the interval codes does not match the number of the target keywords, the output sequence is deleted.

5. The method for generating scientific research question text according to any one of claims 1 to 4, characterized in that: The question text set is obtained in the following way: Acquire a preset text set and a question sentence set, wherein the preset text set includes a plurality of technical texts, and the question sentence set includes a plurality of question sentence texts reflecting the research purpose of the technical texts; For each technical text in the preset text set, extract keywords in the technical text to build a keyword library; For each question sentence text in the question sentence set, performing word segmentation processing on the question sentence text to determine whether the question sentence text contains a keyword in the keyword library; The question sentence texts containing the keywords are used as scientific research question texts to construct a question text set.

6. The method for generating scientific research question text according to claim 5, characterized in that: The target keywords are obtained in the following way: Obtaining at least one first keyword input by a user; Searching the keyword library to determine whether the keyword library includes a second keyword that matches the first keyword; If it is determined that the second keyword exists in the keyword library, the second keyword is used as the target keyword; if it is determined that the second keyword does not exist in the keyword library, a prompt message is sent to the user, and the prompt message is used to instruct the user to re-enter the keyword.

7. A device for generating scientific research question text, characterized in that: include: An input sequence construction module, used to construct an input sequence according to at least one target keyword, wherein the input sequence includes the at least one target keyword and a plurality of masking codes, wherein the first and last portions of the at least one target keyword are respectively adjacent to a masking code; An output sequence acquisition module, used for inputting the input sequence into a pre-trained scientific research question text generation model, outputting at least one output sequence according to the scientific research question text generation model, wherein the output sequence includes a text block corresponding to each masking code, and the scientific research question text generation model is obtained by retraining a pre-trained language model through a sample input sequence and a sample output sequence, and the sample input sequence and the sample output sequence are both obtained by processing the scientific research question text in the question text set; An output sequence processing module, used for filling the target keyword between each text block in the output sequence for each output sequence, and obtaining a candidate question text corresponding to the output sequence; A novelty acquisition module is used to obtain the novelty of each candidate question text, wherein the novelty is positively correlated with the semantic distance between the candidate question text and an existing question text, wherein the existing question text is an existing scientific research question text that contains the target keyword in the question text set; The question text determination module is used to determine the target scientific research question text from various candidate question texts based on the novelty of each candidate question text.

8. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.