Self-adaptive question identification method and system
Through the analysis and processing of adaptive question recognition methods and large language models, the problems of manual processing difficulty and system complexity during question entry and analysis in the existing technology are solved, efficient question recognition and data transmission are achieved, and system resources are reduced Consumption has expanded the application prospects of the question management system.
Patent Information
- Application Number
- CN202411744841.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In the prior art, the process of entering and analyzing questions requires a lot of manual processing and complex rules setting, resulting in low accuracy and efficiency of question identification, especially when the complexity and element differences of the question bank increase, the difficulty and time consumption increase significantly.
Adaptive question recognition method is adopted, and the document is divided and analyzed by large language model. Through predetermined data structure processing, the question types and parameters are obtained, and data transmission is carried out through HTTP request nodes. Data verification is used using MD5 algorithm to ensure that Data integrity.
It reduces the difficulty of manual processing and system complexity, improves the accuracy and efficiency of question identification, reduces abnormal situations caused by missing rules, reduces system resource consumption, and expands the capability boundaries of the question management system.
Smart Images

Figure CN119227672A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to an adaptive question recognition method and system. Background Art
[0002] In the field of education, doing exercises is a good way to understand knowledge and test learning effects. Whether it is a school or an educational institution, it is necessary to manage its own question bank to help students master knowledge. Question entry is an important part of question bank management and the key to improving efficiency. Rule matching technology is a common parsing method. The document parsing and template recording technology solutions currently on the market require a lot of manual processing, and complex rule settings are also required in the system. The accuracy of manually processed data and the comprehensiveness of system rules jointly affect the correctness of question parsing. The more complex the question type, the greater the difference in question elements, the more difficult and time-consuming manual and system processing is.
[0003] The commonly used rule matching technology currently has too strict requirements on the question format. For example, the question identifier, option identifier, parsing identifier, etc. all need to be clearly defined, and data preprocessing needs to be strictly carried out according to the rules. If the content is slightly processed irregularly, it will lead to input failure and poor fault tolerance. How to reduce the difficulty of manual processing, reduce the complexity of question recognition in the system, and improve the recognition accuracy is still an urgent problem that the question bank management system needs to solve. Summary of the invention
[0004] The embodiments of the present invention provide an adaptive question recognition method and system to solve the above technical problems in the prior art.
[0005] In order to have a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not a general review, nor is it intended to identify key / important components or to describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.
[0006] According to a first aspect of an embodiment of the present invention, an adaptive topic recognition method is provided.
[0007] In one embodiment, the adaptive topic identification method includes: Segment the document by title and obtain the title data corresponding to the document; The acquired question data is analyzed using a large language model to obtain question data of different question types and question parameters corresponding to each question data; According to a predetermined data structure, data structuring is performed on the obtained question data of different question types and corresponding question parameters to obtain structured encapsulated question data.
[0008] In one embodiment, the formats of the document include: word document format and Excel document format.
[0009] In one embodiment, segmenting the document by topic and obtaining the topic data corresponding to the document includes: Insert a predetermined separator in the title of the word document in advance, perform word document recognition based on the separator, obtain the title corresponding to the word document, and segment the title to extract the title data; Identify the row data of the Excel document, determine the title position of each row of data, and based on the determined title position, segment the title and extract it into title data.
[0010] In one embodiment, the acquired topic data is analyzed using a large language model to obtain topic data of different topic types and topic parameters corresponding to each topic data, including: Obtaining the question type features corresponding to the preset different question types, and classifying the obtained question data using the question classifier of the large language model according to the question type features to obtain question data of different question types; Using the parameter extractor of the large language model, extract the content parameters of the topic element of each topic data to obtain the corresponding topic parameters; The question elements include: question type, question stem, options, answers, question analysis, chapter classification, labels and notes.
[0011] In one embodiment, when using a parameter extractor of a large language model to extract content parameters of a title element of each title data, if multiple title elements with different content parameters are extracted, a relative majority voting method is used to bid on the multiple title elements with different content parameters, and the content parameter with the largest number of bids is used as the title parameter corresponding to the title element.
[0012] In one embodiment, when a parameter extractor of a large language model is used to extract content parameters of a topic element of each topic data, if multiple topic elements with different content parameters are extracted, the extracted content parameters are segmented using the Jieba vocabulary, and individual characters in the segmentation are deleted while words are retained, and a vocabulary is constructed based on the retained words; the words in the constructed vocabulary are vectorized using a bag-of-words model to obtain vectorized vocabulary data, and the cosine similarity of the vectorized vocabulary data is calculated using a cosine similarity algorithm; the calculated cosine similarity is used as a one-time content score, and the content parameter with the highest score is selected as the topic parameter corresponding to the topic element.
[0013] In one embodiment, the adaptive topic identification method further includes: transmitting data of the structured encapsulated topic data through an HTTP request node.
[0014] In one embodiment, the data transmission of the structured encapsulated topic data through the HTTP request node includes: Pre-setting a verification string, and concatenating the verification string with the structured encapsulated question data to obtain concatenated question data; Calculate the hash value of the concatenated question data using the MD5 algorithm, and use the hash value as the fingerprint data of the structured and encapsulated question data; The structured encapsulated question data and the fingerprint data are transmitted simultaneously, and the data receiving end is prompted to perform fingerprint verification on the structured encapsulated question data using the fingerprint data to determine whether the structured encapsulated question data has been tampered with.
[0015] According to a second aspect of an embodiment of the present invention, an adaptive topic recognition system is provided.
[0016] In one embodiment, the adaptive topic identification system includes: The document processing module is used to segment the document into topics and obtain the topic data corresponding to the document; The model analysis module is used to analyze the acquired question data using a large language model to obtain question data of different question types and question parameters corresponding to each question data; The data processing module is used to perform data structuring processing on the obtained question data of different question types and corresponding question parameters according to a predetermined data structure to obtain structured encapsulated question data.
[0017] In one embodiment, the formats of the document include: word document format and Excel document format.
[0018] In one embodiment, when the document processing module segments the title of a document and obtains the title data corresponding to the document, it inserts a predetermined separator in the title of a word document in advance, and recognizes the word document based on the separator to obtain the title corresponding to the word document, and then segments the title and extracts it into title data; it recognizes the row data of the Excel document, determines the title position of each row of data, and based on the determined title position, segments the title and extracts it into title data.
[0019] In one embodiment, when the model analysis module uses a large language model to analyze the acquired question data to obtain question data of different question types and question parameters corresponding to each question data, it obtains the pre-set question type features corresponding to the different question types, and classifies the acquired question data according to the question type features using the question classifier of the large language model to obtain question data of different question types; uses the parameter extractor of the large language model to extract content parameters of the question elements of each question data to obtain corresponding question parameters; wherein the question elements include: question type, question stem, options, answers, question analysis, chapter classification, labels and notes.
[0020] In one embodiment, when the model analysis module uses the parameter extractor of the large language model to extract the content parameters of the title element of each title data, if multiple title elements with different content parameters are extracted, the relative majority voting method is used to bid on the multiple title elements with different content parameters, and the content parameter with the largest number of bids is used as the title parameter corresponding to the title element.
[0021] In one embodiment, when the model analysis module uses the parameter extractor of the large language model to extract the content parameters of the title element of each title data, if multiple title elements with different content parameters are extracted, the extracted content parameters are segmented using the Jieba vocabulary, and single characters in the segmentation are deleted and words are retained, and a vocabulary is constructed based on the retained words; the words in the constructed vocabulary are vectorized using the bag-of-words model to obtain vectorized vocabulary data, and the cosine similarity of the vectorized vocabulary data is calculated using the cosine similarity algorithm; the calculated cosine similarity is used as a one-time content score, and the content parameter with the highest score is selected as the title parameter corresponding to the title element.
[0022] In one embodiment, the adaptive topic identification method further includes: a data transmission module, which is used to transmit the structured encapsulated topic data through an HTTP request node.
[0023] In one embodiment, when the data transmission module transmits the structured encapsulated question data through the HTTP request node, a verification string is pre-set, and the verification string is spliced with the structured encapsulated question data to obtain the spliced question data; the hash value of the spliced question data is calculated using the MD5 algorithm, and the hash value is used as the fingerprint data of the structured encapsulated question data; the structured encapsulated question data and the fingerprint data are simultaneously transmitted, and the data receiving end is prompted to use the fingerprint data to perform fingerprint verification on the structured encapsulated question data to determine whether the structured encapsulated question data has been tampered with.
[0024] According to a third aspect of an embodiment of the present invention, a computer device is provided.
[0025] In one embodiment, the computer device includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above method when executing the computer program.
[0026] According to a fourth aspect of embodiments of the present invention, a computer-readable storage medium is provided.
[0027] In one embodiment, the computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.
[0028] The technical solution provided by the embodiment of the present invention may have the following beneficial effects: The present invention can adjust the complex rules in the data preprocessing stage into simple topic segmentation marks, and use a large language model to analyze and process the topics, which can greatly reduce the time investment of the business in the data processing stage. At the same time, there is no need to set a large number of topic element matching rules in the system, which can effectively reduce the abnormal situation of topic data caused by the lack of rules and reduce the consumption of system resources. At the same time, the design of this module allows it to be flexibly integrated into common topic management systems, which can effectively expand the system's capability boundaries and has broad application prospects and practical value.
[0029] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0031] Figure 1 is a flowchart of an adaptive topic recognition method according to an exemplary embodiment; Figure 2 is a structural block diagram of an adaptive topic recognition system according to an exemplary embodiment; Figure 3 is a schematic diagram of a question classifier structure according to an exemplary embodiment; Figure 4 is a schematic diagram of a parameter extractor according to an exemplary embodiment; Figure 5 The figure is a schematic diagram showing the structure of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION
[0032] The following description and accompanying drawings fully illustrate the specific embodiments of this article so that those skilled in the art can practice them. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. The scope of the embodiments of this article includes the entire scope of the claims, as well as all available equivalents of the claims. Herein, the terms "first", "second", etc. are only used to distinguish one element from another, without requiring or implying any actual relationship or order between these elements. In fact, the first element can also be called the second element, and vice versa. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the structure, device or equipment including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such structure, device or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the structure, device or equipment including the elements. Each embodiment is described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other.
[0033] The terms "longitudinal", "lateral", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. in this document indicate the orientation or position relationship based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing this document and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In the description of this document, unless otherwise specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a mechanical connection or an electrical connection, it can also be the internal communication of two elements, it can be a direct connection, or it can be an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0034] As used herein, the term "plurality" means two or more than two, unless otherwise specified.
[0035] In this document, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.
[0036] In this article, the term "and / or" is a description of the association relationship between objects, indicating that three relationships may exist. For example, A and / or B means: A or B, or, A and B.
[0037] It should be understood that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0038] Each module in the device or system of the present application can be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to the above modules.
[0039] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0040] Figure 1 An embodiment of an adaptive topic identification method of the present invention is shown.
[0041] In this optional embodiment, the adaptive topic identification method includes: Step S101, segment the document by topic and obtain topic data corresponding to the document; Step S103, using the large language model to analyze the acquired question data, obtaining question data of different question types and question parameters corresponding to each question data; Step S105, according to a predetermined data structure, data structuring is performed on the obtained question data of different question types and corresponding question parameters to obtain structured encapsulated question data.
[0042] Figure 2 An embodiment of an adaptive topic recognition system of the present invention is shown.
[0043] In this optional embodiment, the adaptive topic identification system includes: The document processing module 201 is used to segment the document into topics and obtain topic data corresponding to the document; The model analysis module 203 is used to analyze the acquired question data using a large language model to obtain question data of different question types and question parameters corresponding to each question data; The data processing module 205 is used to perform data structuring processing on the obtained question data of different question types and corresponding question parameters according to a predetermined data structure to obtain structured encapsulated question data.
[0044] In the above optional embodiment, the formats of the document include: word document format and Excel document format.
[0045] In the above optional embodiment, when the document is segmented into titles and the title data corresponding to the document is obtained, a predetermined separator is inserted in the title of the word document in advance, and the word document is recognized based on the separator to obtain the title corresponding to the word document, and the title is segmented and extracted into title data; the row data of the Excel document is recognized to determine the title position of each row of data, and based on the determined title position, the title is segmented and extracted into title data.
[0046] In the above optional embodiment, when using a large language model (LLM) to analyze the acquired question data to obtain question data of different question types and question parameters corresponding to each question data, the question type features corresponding to the pre-set different question types are obtained, and according to the question type features, the acquired question data are classified using a question classifier of the large language model to obtain question data of different question types; the parameter extractor of the large language model is used to extract content parameters of the question elements of each question data to obtain corresponding question parameters; wherein the question elements include: question type, question stem, options, answers, question analysis, chapter classification, labels and notes.
[0047] In addition, when the parameter extractor of the large language model is used to extract the content parameters of the title element of each title data, if the same title element with multiple different content parameters is extracted, the relative majority voting method is used to bid for the same title element with multiple different content parameters, and the content parameter with the largest number of bids is used as the title parameter corresponding to the title element. Alternatively, when the parameter extractor of the large language model is used to extract the content parameters of the title element of each title data, if the same title element with multiple different content parameters is extracted, the jieba word library is used to segment the extracted content parameters, and the single characters in the segmentation are deleted and the words are retained, and a vocabulary is constructed based on the retained words; the words in the constructed vocabulary are vectorized using the bag of words model to obtain vectorized vocabulary data, and the cosine similarity of the vectorized vocabulary data is calculated using the cosine similarity algorithm; the calculated cosine similarity is used as a one-time content score, and the content parameter with the highest score is selected as the title parameter corresponding to the title element.
[0048] Specifically, the questions are segmented and stored in a question list, and questions are extracted from the question list and input into the question classifier. The question classifier is set as follows: Figure 3 As shown in the figure. In question classification, define the basic question types included in the question bank, such as single-choice questions, multiple-choice questions, true-or-false questions, fill-in-the-blank questions, essay questions, drag-and-drop questions, etc. The principle of the question classifier is to classify each question type, and the characteristics of the question type need to be clearly defined in the classification. The large language model will combine its own knowledge with the characteristics defined in the classification prompt words to judge the question type of the questions input into the question classifier.
[0049] Each classification of the question classifier is followed by a parameter extractor (such as Figure 4 ). The questions classified by the question classifier will be transmitted to the corresponding parameter extractor. In the parameter extractor, the large language model can extract question elements of different question types based on the definition of question elements in the prompt words.
[0050] When the parameter extractor extracts parameters, in addition to extracting content, it is also necessary to set policies to ensure the correctness of content extraction. The available policies include the following two types: 1) Voting method. This strategy is suitable for extracting parameters with enumerated values, such as the enumerated values of the question type of multiple-choice questions are single-choice questions and multiple-choice questions. In order to prevent extraction errors, a combination of absolute rules and relative majority voting is adopted. First, set an absolute rule, and the question type obtained by hitting the absolute rule is the final question type. For example, the absolute rule for the multiple-choice question type is "a. If the beginning or end of the question stem clearly mentions one of the single-choice questions or multiple-choice questions, the question type is directly assigned, and b. If there are multiple answers, it is a multiple-choice question." If the absolute rule is not hit, the relative majority voting method is used to vote on multiple question types extracted by other rules, and the question type with the most votes is the final question type of the question.
[0051] 2) Consistency scoring: This strategy is applicable to consistency checking of text extraction.
[0052] ① Use a large language model to extract parameters of the same question multiple times, such as the extraction of the question stem, so that multiple pieces of stem information for a question can be obtained.
[0053] ② Use the Jieba word library to segment the input parameter content. For example, if you input three questions of the same question, A: "Machine learning is a branch of artificial intelligence." B: "Artificial intelligence has applications in all fields." C: "Learning Python can help you understand machine learning" Through jieba word segmentation, we can get the following content: ['Machine learning is a branch of artificial intelligence', 'Artificial intelligence has applications in various fields', 'Learning Python can help understand machine learning']; ③ Delete the individual words in the word segmentation, keep only the words, and then construct the vocabulary of the question. The above content will be retained as ['python' 'a' 'artificial intelligence' 'branch' 'can' 'various fields' 'learn' 'help' 'apply' 'machine' 'understand']; ④Use the bag-of-words model to vectorize the extracted vocabulary, that is, count the number of times each word appears in the question stem, and then use a vector to represent each question stem. A, B, and C in step ② will be represented as: [0 1 1 1 0 0 1 0 0 1 0], [00 1 0 0 1 0 0 1 0 0], [1 0 0 0 1 0 2 1 0 1 1] respectively; ⑤Use the cosine similarity algorithm ( ), calculate the text content similarity. Then the cosine similarity between A and C is 0.447.
[0054] ⑥ Calculate the sum of the cosine similarities of each content as the consistency score of the text content, and the content with the highest score is the final parameter content. For example, in step ②, the similarity between A and B is 0.258, the similarity between A and C is 0.447, and the similarity between B and C is 0. Then the similarity score of content A is 0.705 (0.258+0.447), the similarity score of content B is 0.258, and the similarity score of content C is 0.447. Finally, content A is used as the stem of the question.
[0055] In the above optional embodiment, when performing data structuring processing, the input variables, i.e., the parameters extracted by the parameter extractor, can be defined first, and then the data processing function can be defined in the code module, and finally the data structuring can be reorganized to complete the data structuring processing. For example, the parameter extractor extracts question_type as a single-choice question and answer as A, then after structuring, it becomes {"question_type": "single-choice question", "answer": "A"}. The purpose of structuring is to be able to directly transmit the data extracted by the large language model to the background through the interface.
[0056] In the above optional embodiment, the adaptive topic identification method further includes: data transmission of the structured encapsulated topic data through the HTTP request node. When the structured encapsulated topic data is transmitted through the HTTP request node, a verification string is pre-set, and the verification string is concatenated with the structured encapsulated topic data to obtain the concatenated topic data; the hash value of the concatenated topic data is calculated using the MD5 algorithm, and the hash value is used as the fingerprint data of the structured encapsulated topic data; the structured encapsulated topic data and the fingerprint data are transmitted simultaneously, and the data receiving end is prompted to use the fingerprint data to perform fingerprint verification on the structured encapsulated topic data to determine whether the structured encapsulated topic data has been tampered with.
[0057] Specifically, in the HTTP request node, set the API interface, access method, and verification string (the string agreed with the backend), and put the structured data processed in the previous step into the body. The specific steps are as follows: ① Concatenate the body data (structured data) with the verification string. For example, if the verification string is "AFB65@#$$$$@", the concatenated data is: {"question_type": "single choice question", "answer": "A"} AFB65@#$$$$@; ② Use the MD5 (Message Digest Algorithm 5) algorithm to calculate the hash value of the concatenated data as the "fingerprint" of the data content. In this invention, the md5 method of the built-in hashlib module of Python is directly used to calculate the hash value. Since the hash value calculated by this algorithm is irreversible, the default method is effective enough; ③Send the structured data and "fingerprint" to the backend at the same time. Note that the verification string is not transmitted. Since the title information is not sensitive data, this process uses plain text transmission. In order to ensure that the transmitted content is not tampered with, "fingerprint" verification is required; ④ After receiving the structured data, the background also concatenates the structured data with the verification string and calculates the "fingerprint" of the concatenated content.
[0058] ⑤Compare the "fingerprints" of ③ and ④. If the "fingerprints" are consistent, it means that the transmitted content has not been tampered with, that is, the incoming structured data can be used to create questions.
[0059] Based on the above technical solution, the present invention can adjust the complex rules in the data preprocessing stage into simple topic segmentation marks, and use a large language model to analyze and process the topics, which can greatly reduce the time investment of the business in the data processing stage. At the same time, there is no need to set a large number of topic element matching rules in the system, which can effectively reduce the abnormal situation of topic data caused by the lack of rules and reduce the consumption of system resources. At the same time, the design of this module allows it to be flexibly integrated into common topic management systems, which can effectively expand the system's capability boundaries and has broad application prospects and practical value.
[0060] Figure 5 An embodiment of a computer device of the present invention is shown, which may be a server, and includes a processor, a memory and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store static information and dynamic information data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the steps in the above method embodiment are implemented.
[0061] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0062] In addition, the present invention also provides the above-mentioned computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiment when executing the computer program.
[0063] In addition, the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.
[0064] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0065] The present invention is not limited to the structures which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. An adaptive topic recognition method, characterized in that: include: Segment the document by title and obtain the title data corresponding to the document; The acquired question data is analyzed using a large language model to obtain question data of different question types and question parameters corresponding to each question data; According to a predetermined data structure, data structuring is performed on the obtained question data of different question types and corresponding question parameters to obtain structured encapsulated question data.
2. The adaptive question recognition method according to claim 1, characterized in that: The formats of the document include: word document format and Excel document format.
3. The adaptive question recognition method according to claim 2, characterized in that: Segment the document by title and obtain the title data corresponding to the document, including: Insert a predetermined separator in the title of the word document in advance, perform word document recognition based on the separator, obtain the title corresponding to the word document, and segment the title to extract the title data; Identify the row data of the Excel document, determine the title position of each row of data, and based on the determined title position, segment the title and extract it into title data.
4. The adaptive question recognition method according to claim 1, characterized in that: The obtained question data is analyzed using a large language model to obtain question data of different question types and question parameters corresponding to each question data, including: Obtaining the question type features corresponding to the preset different question types, and classifying the obtained question data using the question classifier of the large language model according to the question type features to obtain question data of different question types; Using the parameter extractor of the large language model, extract the content parameters of the topic element of each topic data to obtain the corresponding topic parameters; The question elements include: question type, question stem, options, answers, question analysis, chapter classification, labels and notes.
5. The adaptive question recognition method according to claim 4, characterized in that: When using the parameter extractor of the large language model to extract the content parameters of the title element of each title data, if multiple title elements with different content parameters are extracted, the relative majority voting method is used to bid on the multiple title elements with different content parameters, and the content parameter with the largest number of bids is used as the title parameter corresponding to the title element.
6. The adaptive question recognition method according to claim 4, characterized in that: When using the parameter extractor of the large language model to extract the content parameters of the title element of each title data, if multiple title elements with different content parameters are extracted, the extracted content parameters are segmented using the Jieba vocabulary, and single characters in the segmentation are deleted and words are retained, and a vocabulary is constructed based on the retained words; the words in the constructed vocabulary are vectorized using the bag-of-words model to obtain vectorized vocabulary data, and the cosine similarity of the vectorized vocabulary data is calculated using the cosine similarity algorithm; the calculated cosine similarity is used as a one-time content score, and the content parameter with the highest score is selected as the title parameter corresponding to the title element.
7. The adaptive topic recognition method according to claim 1, characterized in that: Also includes: The structured encapsulated topic data is transmitted through the HTTP request node.
8. The adaptive topic recognition method according to claim 7, characterized in that: The data transmission of the structured and encapsulated topic data through the HTTP request node includes: Pre-setting a verification string, and concatenating the verification string with the structured encapsulated question data to obtain concatenated question data; Calculate the hash value of the concatenated question data using the MD5 algorithm, and use the hash value as the fingerprint data of the structured and encapsulated question data; The structured encapsulated question data and the fingerprint data are transmitted simultaneously, and the data receiving end is prompted to perform fingerprint verification on the structured encapsulated question data using the fingerprint data to determine whether the structured encapsulated question data has been tampered with.
9. An adaptive question recognition system, characterized in that: include: The document processing module is used to segment the document into topics and obtain the topic data corresponding to the document; The model analysis module is used to analyze the acquired question data using a large language model to obtain question data of different question types and question parameters corresponding to each question data; The data processing module is used to perform data structuring processing on the obtained question data of different question types and corresponding question parameters according to a predetermined data structure to obtain structured encapsulated question data.
10. The adaptive question recognition system according to claim 9, characterized in that: The model analysis module uses the large language model to analyze the acquired question data to obtain question data of different question types and question parameters corresponding to each question data, obtains the preset question type features corresponding to the different question types, and classifies the acquired question data using the question classifier of the large language model according to the question type features to obtain question data of different question types; The parameter extractor of the large language model is used to extract the content parameters of the question elements of each question data to obtain the corresponding question parameters; wherein the question elements include: question type, question stem, options, answers, question analysis, chapter classification, labels and notes.
Citation Information
Patent Citations
Topic text classification method and device
CN110232128A
Question input method, question input device, electronic equipment and computer readable storage medium
CN112861864A
Natural language question answering method and device based on large language model, medium and equipment
CN117473053A
Model training method and apparatus, knowledge classification method and apparatus, and device and medium
WO2023108991A1
