Text information extraction method and device, computer equipment and storage medium

By encoding the knowledge text and identifying the global pointer network, combining rotating position coding, and extracting knowledge triplets, the problem of low accuracy of text information extraction in the existing technology is solved, and higher extraction accuracy and comprehensiveness are achieved.

CN119990287APending Publication Date: 2025-05-13SHENZHEN TIANYUAN DIC INFORMATION TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411974893.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing text information extraction methods are not accurate and it is difficult to obtain the connection between entities and relationships.

Method used

By encoding the knowledge text, using a global pointer network for naming entity recognition, combined with rotating position encoding, knowledge triples are extracted.

Benefits of technology

It improves the accuracy and comprehensiveness of information extraction and enhances the understanding of the connection between entities and relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990287A_ABST
    Figure CN119990287A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of education and artificial intelligence, and provides a text information extraction method and device, computer equipment and a storage medium, and the method comprises the steps: carrying out the coding processing of a knowledge text, and obtaining a coding vector sequence; according to the method, named entity recognition is carried out based on the coding vector sequence through the global pointer network, a plurality of subjects and the starting position and the ending position of each subject in the knowledge text are obtained, and the global pointer network can accurately recognize named entities (namely the subjects) in the knowledge text by using information in the coding vector sequence. By performing rotation position coding on the starting position and the ending position, the expression ability of the position information can be further enhanced, and after the subjects and the accurate position information thereof are obtained, the relationship between the subjects is further extracted in combination with a preset relationship type set to form a knowledge triple. According to the method, the position information is fully utilized, and the accuracy and comprehensiveness of text information extraction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of education and artificial intelligence technology, and in particular to a text information extraction method, apparatus, computer equipment, and storage medium. Background Art

[0002] With the rapid development of information technology, the education sector is undergoing a transformation from traditional teaching methods to digital and intelligent ones. During this transformation, educators must manually extract key knowledge points from various original knowledge documents (paper or electronic). This is the core of subsequent PPT courseware production and test question creation. The degree to which educators grasp and extract key knowledge points from original knowledge documents significantly impacts the quality of their teaching.

[0003] With the continuous advancement of artificial intelligence technology, especially the emergence of large multimodal models (such as the GPT series and BERT), key information can be quickly and automatically extracted from text, thus opening up new paths for knowledge extraction. However, the traditional process of extracting text information usually involves first performing entity recognition on the input sequence to find the subject and object in the text, then using a classification model to establish the relationship type (relation) between entities, and ultimately obtaining knowledge triples in the format of (subject, relation, object). This approach separates the two processes of information extraction and relationship classification, making it difficult to obtain the connection between entities and relationships, resulting in low accuracy of the extracted information. Summary of the Invention

[0004] Based on this, a text information extraction method, apparatus, computer equipment and storage medium are proposed, aiming to solve the technical problem of low accuracy of existing text information extraction.

[0005] A first aspect of the present application provides a text information extraction method, the method comprising:

[0006] Encode the knowledge text to obtain a coding vector sequence;

[0007] Performing named entity recognition based on the encoding vector sequence through a global pointer network to obtain multiple subjects and the starting position and ending position of each subject in the knowledge text;

[0008] Performing rotation position encoding on the starting position and the ending position to obtain a starting encoding position and an ending encoding position;

[0009] Extraction is performed based on the subject, the starting coding position and the ending coding position of each subject, and a preset relationship type set to obtain a knowledge triple.

[0010] Optionally, the method further includes:

[0011] Obtain original knowledge documents;

[0012] Performing binary classification on the original knowledge document;

[0013] When the original knowledge document is a picture, a preset first recognition model is used to recognize the original knowledge document to obtain a knowledge text;

[0014] When the original knowledge document is a text type, a preset second recognition model is used to recognize the original knowledge document to obtain a knowledge text.

[0015] Optionally, the method further includes:

[0016] Obtaining a key knowledge set based on the knowledge triples;

[0017] Teaching materials are automatically generated based on the key knowledge set.

[0018] Optionally, the automatically generating teaching materials based on the key knowledge set includes:

[0019] Generate teaching courseware based on the key knowledge set; and / or

[0020] Generate teaching test questions based on the key knowledge set.

[0021] Optionally, generating teaching courseware based on the key knowledge set includes:

[0022] When receiving a courseware production instruction input by a first user, selecting a target courseware template from a plurality of preset courseware templates according to the courseware production instruction;

[0023] Reprocessing the key knowledge set to obtain a first processed knowledge set;

[0024] The teaching courseware is generated based on the first processing knowledge set and the target courseware template.

[0025] Optionally, generating teaching test questions based on the key knowledge set includes:

[0026] Upon receiving a test question creation instruction input by a first user, reprocessing the key knowledge set to obtain a second processed knowledge set;

[0027] Parsing the test question creation instruction;

[0028] When the test question preparation instruction obtained by parsing includes test points, generating the teaching test question based on the test points and the second processing knowledge set;

[0029] When the test question preparation instruction obtained by analysis includes the number of test questions and the type of test questions, the teaching test questions are generated based on the number of test questions, the type of test questions and the second processing knowledge set.

[0030] Optionally, the method further includes:

[0031] receiving a test answer sheet submitted by a second user, wherein the test answer sheet includes answers to subjective questions;

[0032] Splicing the answers to the subjective questions with the corresponding standard answers to obtain spliced ​​answers;

[0033] Input the concatenated answer into the pre-trained fusion CoSENT model to obtain a semantic similarity score;

[0034] A test report is output based on the semantic similarity score.

[0035] A second aspect of the present application provides a text information extraction device, the device comprising:

[0036] The text encoding module is used to encode the knowledge text and obtain the encoding vector sequence;

[0037] An entity recognition module is used to perform named entity recognition based on the encoding vector sequence through a global pointer network to obtain multiple entities and the starting position and ending position of each entity in the knowledge text;

[0038] A position encoding module, configured to perform rotational position encoding on the starting position and the ending position to obtain a starting encoding position and an ending encoding position;

[0039] The knowledge extraction module is used to extract knowledge triples based on the subject, the starting coding position and the ending coding position of each subject and a preset relationship type set.

[0040] A third aspect of the present application provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the text information extraction method when executing the computer program.

[0041] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the text information extraction method are implemented.

[0042] After encoding the knowledge text and obtaining a coding vector sequence, the present application performs named entity recognition based on the coding vector sequence through a global pointer network to obtain multiple subjects and the starting position and ending position of each subject in the knowledge text. The global pointer network uses the information in the coding vector sequence to accurately identify the named entities (i.e., subjects) in the knowledge text and determine the specific positions (starting position and ending position) of these subjects in the text. This recognition method not only improves the accuracy of recognition, but also provides accurate position information for subsequent relationship extraction steps. By performing rotational position encoding on the starting position and the ending position, the expressive power of the position information can be further enhanced. This encoding method can capture the relative relationship between positions, so that the subsequent relationship extraction step can more accurately understand the spatial relationship between subjects, thereby improving the accuracy of extraction. After obtaining the subject and its accurate position information (starting coding position and ending coding position), combined with the preset relationship type set, the relationship between the subjects can be further extracted to form a knowledge triple. This extraction method not only relies on the semantic information of the subject, but also makes full use of the position information and the preset relationship type, thereby improving the accuracy and comprehensiveness of the extraction. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0044] Figure 1 It is a flowchart of the text information extraction method provided in an embodiment of the present application.

[0045] Figure 2 This is a schematic diagram of a global pointer network identifying nested entities provided by an embodiment of the present application.

[0046] Figure 3 It is a schematic diagram of the generation process of the knowledge triples provided in the embodiment of the present application.

[0047] Figure 4 It is a flowchart of a method for generating teaching courseware based on a key knowledge set provided in an embodiment of the present application.

[0048] Figure 5 This is a schematic diagram of generating a teaching syllabus provided in an embodiment of the present application.

[0049] Figure 6 This is a flowchart of a method for generating teaching test questions based on a key knowledge set provided in an embodiment of the present application.

[0050] Figure 7 This is a schematic diagram of the interface for question type selection provided in an embodiment of the present application.

[0051] Figure 8 It is a schematic diagram of the fused CosENT provided in an embodiment of the present application.

[0052] Figure 9 This is a functional module diagram of the text information extraction device provided in an embodiment of the present application.

[0053] Figure 10 It is a structural diagram of the computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0055] In the training field, the main responsibilities of teachers and trainers include not only teaching, but also spending a lot of time on teaching preparation, especially the production of PowerPoint presentations and the setting and grading of examination papers. The current traditional production of PowerPoint presentations and examination papers relies heavily on manual labor, which has the following key problems:

[0056] 1) Knowledge extraction: Manually extracting key knowledge points from various original knowledge documents (paper or electronic) is the core of PPT courseware and exam question creation. The instructor's grasp and extraction of core knowledge points from the original knowledge documents will greatly affect the quality of teaching. In addition, the instructor often writes a draft outline and repeatedly revises it, which often takes a lot of time.

[0057] 2) Courseware production: To ensure effective teaching, the process of creating courseware requires considerable effort in designing the PPT layout, selecting images, and creating charts. Creating a high-quality PPT is often a tedious process, especially for educators unfamiliar with design tools.

[0058] 3) Question setting and grading: To ensure the quality of course delivery, in-class tests or after-class exercises are important ways to test and consolidate knowledge points. Teachers and trainers need to create test questions based on the knowledge points in the textbook to ensure comprehensive coverage of the knowledge points taught, avoid repeated or off-topic questions, and regularly update the test questions. This increases the workload of teachers and trainers in setting questions. Furthermore, after students complete the test, teachers and trainers need to intervene and grade the papers. Therefore, in addition to creating questions, standard answers and grading criteria must be designed to ensure assessment accuracy.

[0059] With the rapid development of information technology, the education sector is undergoing a transformation from traditional teaching methods to digital and intelligent ones. In recent years, template-based PPT creation software and online question bank platforms have emerged. While these tools have improved the efficiency of courseware and test generation to a certain extent, they still have limitations.

[0060] 1) Regarding PPT courseware production:

[0061] While PPT production software provides users with preset templates, simplifying some aspects of the visual design and layout process, users still need to organize course content and manually edit, input, or paste text and images. It cannot automatically extract, organize, and structure content based on themes, thereby failing to automatically generate logically structured PPTs. Furthermore, PPT production software only supports a limited number of formats and has limited capabilities for automatically parsing and extracting content, preventing users from fully utilizing their data.

[0062] 2) Regarding intelligent question setting and scoring:

[0063] The online question bank platform can only search for existing questions in the question bank based on keywords entered by the user, or provide a template-based question editing function. It cannot automatically generate questions that meet the teaching objectives based on the course content. In addition, the questions in the question bank are less targeted. Especially when facing some more innovative courses or emerging disciplines, the questions in the question bank cannot be updated in a timely manner and cannot cover all key knowledge points. Furthermore, the question formats are relatively limited, mainly focusing on basic question types such as multiple-choice questions and true-or-false questions. It is impossible to choose the difficulty of the test questions, making it difficult to meet diverse teaching needs, especially under different learning objectives. There is a lack of question design that can evaluate the practical application ability of the segmentation.

[0064] With the continuous advancement of artificial intelligence technology, especially the emergence of large multimodal models (such as the GPT series, BERT, etc.), new possibilities have been provided for the automated generation of educational content. Large multimodal models can understand and generate various types of data such as text, images, audio, etc., opening up new paths for the diversified expression of courseware and the intelligent design of test questions. However, due to the different formats of various original knowledge documents, the complex expression of text-type knowledge and the widespread problem of nested knowledge entities, it is difficult to use standard artificial intelligence language models to achieve automated knowledge extraction. In addition, the traditional process of extracting text information separates the two processes of information extraction and relationship classification from each other, making it difficult to obtain the connection between entities and relationships, resulting in low accuracy of the extracted information, which in turn leads to low accuracy in the production of courseware and test questions.

[0065] In order to solve at least one of the above-mentioned technical problems, this application proposes a text information extraction method based on a multimodal large model, which can accurately extract key information from the text.

[0066] Before describing the text information extraction method of the embodiment of the present application, it is necessary to first obtain the original knowledge document, identify the knowledge text from the original knowledge document, and then extract key information based on the knowledge text.

[0067] Multiple original knowledge documents can be obtained from databases, file systems, networks, etc. These original knowledge documents can be in various formats, including but not limited to: plain text (Word documents, TXT text documents), images, PDFs, etc.

[0068] In an optional embodiment, due to the different types of original knowledge documents, in order to improve the accuracy and efficiency of identifying knowledge texts, the original knowledge documents can be classified into two categories and identified based on their type. For example, when the original knowledge document is an image, a preset first recognition model is used to identify the original knowledge document to obtain the knowledge text. When the original knowledge document is a text, a preset second recognition model is used to identify the original knowledge document to obtain the knowledge text.

[0069] After obtaining the original knowledge document, the extension of the original knowledge document can be obtained and the original knowledge document can be classified according to the extension. In the embodiment of the present application, the original knowledge documents are divided into two categories: one is image documents and the other is text documents. The purpose of classification is to be able to use the most appropriate recognition model to process different types of documents later.

[0070] If the original knowledge document is classified as a picture, a preset first recognition model can be used to identify the picture. The first recognition model can be a model based on OCR (optical character recognition) technology, which can convert the text in the picture into an editable text format. In other embodiments, the text line detection model can also be trained first, the DBNet algorithm is selected, the backbone network selects mobilenet_v3_large, the Neck network selects DBFPN, and the Head network selects DBHead; since there are 90-degree or 190-degree rotations in the training data, the direction classifier is also trained to automatically identify the rotation angle of the text line. For example, the resnet image classification model can be selected for training; the detected text line content is subjected to text recognition, and CRNN is selected as the recognition pre-training model for text recognition of the original knowledge document. The embodiment of the present application can also encapsulate and deploy the text line detection model, direction classifier and text recognition model.

[0071] If the original knowledge document is classified as a text document, a preset second recognition model can be used to recognize the text. The second recognition model is a model used for text cleaning, formatting, or preprocessing to ensure that the content of the text document meets the requirements of subsequent information extraction.

[0072] The above process is the preprocessing step of the text information extraction method, providing the necessary preparation for subsequent information extraction. By performing binary classification on the original knowledge documents, the most appropriate recognition model can be selected based on the classification results, avoiding the inefficiencies that may arise when using a universal model to process all document types. Using specially trained recognition models for different types of knowledge documents can significantly improve recognition accuracy. Furthermore, by using binary classification and different recognition models, the system can more easily adapt to different types of input documents. This increases the system's flexibility and scalability, enabling it to handle a wider variety of knowledge documents.

[0073] Figure 1 This is a flow chart of a text information extraction method provided in an embodiment of the present application. The text information extraction method includes the following steps.

[0074] S11, encode the knowledge text to obtain an encoding vector sequence.

[0075] Knowledge text can be encoded using a word embedding encoder. The embedding encoder can be BERT (Bidirectional Encoder Representations from Transformers). BERT is a pre-trained deep learning model that can learn contextual representations of language from large amounts of text data.

[0076] The word embedding encoder takes the knowledge text as input, converting it into a series of encoding vectors. These vectors are mathematical representations of each word or phrase (called a token) in the text. After encoding, each token is assigned an encoding vector. The encoding vectors are arranged in the order in which they appear in the original knowledge text, forming an encoding vector sequence. This encoding vector sequence contains the semantic information of all tokens in the knowledge text and serves as the basis for subsequent named entity recognition and joint entity relationship extraction.

[0077] S12, performing named entity recognition based on the encoding vector sequence through a global pointer network to obtain multiple subjects and the starting position and ending position of each subject in the knowledge text.

[0078] In the named entity recognition task, sequence labeling and pointer network methods are commonly used methods for decoding tasks. The sequence labeling task is essentially to transform the decoding problem into a multi-classification problem. Sequence labeling often adopts the BIO labeling method, using CNNs, RNNs or BERT for feature encoding, and connecting CRF conditional random fields or Softmax functions to assist in entity recognition. During the labeling process, each token can only be identified as one entity type. When entities are nested, this method cannot effectively label the sequence. The pointer network method usually first performs two Softmax predictions on the entire sequence to predict the head pointer and tail pointer of the answer, and then splices the positions of the two pointers to output the predicted answer. However, when performing entity recognition or reading comprehension, the design of conventional pointer networks generally uses two modules to identify the head and tail of the entity respectively, which will lead to inconsistencies during training and prediction.

[0079] The embodiment of the present application provides a global pointer network that uses a global normalization approach to perform named entity recognition.

[0080] The input to the global pointer network is a sequence of encoding vectors for a knowledge document, previously obtained using a word embedding encoder (such as BERT). Each vector in the encoding vector sequence represents the semantic information of a word or phrase in the document. The global pointer network uses a pointer mechanism to directly point to entity boundaries within the input encoding vector sequence. These pointers can be soft pointers (a probability distribution generated by an attention mechanism) or hard pointers (indices pointing directly to specific locations). Through the decoding process, the network utilizes the information in the encoding vector sequence to generate a score or probability for each possible entity. These scores reflect the likelihood that each location in the knowledge document is the start and end point of an entity. By comparing these scores, the global pointer network selects the start and end locations with the highest scores as the entity's start and end locations. Finally, the global pointer network outputs one or more identified entities (subjects), as well as the start and end locations of each subject in the knowledge document. This information is typically presented in a structured format (such as JSON or XML) to facilitate subsequent processing and analysis.

[0081] The global pointer network considers the entire input sequence, not just the local context, when determining the location of an entity. This helps address the problems of entity nesting and overlap, improving recognition accuracy and robustness. The global pointer network treats the beginning and end of an entity as a whole for identification, greatly improving the efficiency of the model during training and recognition. Assuming the length of the text sequence to be recognized is n, for simplicity, we assume that there is only one entity to be recognized, and that each entity to be recognized is a continuous segment of the sequence, of unlimited length, and can be nested within each other (there is an intersection between two entities). The number of candidate entities is: That is, a sequence of length n has There are different continuous subsequences, which contain all possible entities. Picking out the real entity from here can be abstracted as a k-select multi-label classification problem.

[0082] Assume that the input text t of length n is encoded to obtain the vector sequence [h1, h2, ..., hn]. By transforming qiα = Wqα*hi + bqα and kiα = Wkα*hi + bkα, we can obtain the vector sequences [q1, α, q2, α, ..., qn, α] and [k1, α, k2, α, ..., kn, α], which are the vector sequences used to identify the αth type of entity. In this case, the score of the continuous segment from i to j is the type of entity α, which can be defined as: Here, t[i:j] refers to a continuous substring consisting of the i-th to j-th elements of sequence t.

[0083] The Global Pointer Network simplifies the calculation compared to the standard Multi-Head Attention of the Transformer, that is, it removes the calculation of the V matrix. The schematic diagram of the Global Pointer Network recognizing nested entities can be found in Figure 2 As shown. Figure 2 As can be seen in Figure 2, the global pointer network creates separate heads for all relationships, extracting the start and end positions of entities all at once. Dynamic programming is not required during prediction, and the extraction process is completely parallel.

[0084] S13, performing rotation position encoding on the starting position and the ending position to obtain a starting encoding position and an ending encoding position.

[0085] When the training corpus is relatively limited, the global pointer network does not explicitly include relative position information. When processing multi-entity sequences, the head and tail combinations of any two entities are sometimes predicted as targets. In order to enhance the performance of the model, the embodiment of the present application introduces rotational position encoding. Rotary Position Embedding (RoPE) is a relative position encoding method. Unlike traditional position encoding (such as sine-cosine position encoding), rotational position encoding embeds position information into the encoding vector by means of a rotation matrix, thereby achieving effective encoding of position information without increasing the complexity of the model. The starting position is rotationally encoded to obtain a starting encoding position. The ending position is rotationally encoded to obtain an ending encoding position.

[0086] See also Figure 3As shown in the figure, the start and end positions are two points in the text sequence. The entire text sequence can be considered as a series of tokens (such as words or characters). Each token is converted into a corresponding index through the dictionary, and then converted into a fixed-dimensional vector through the embedding operation.

[0087] Before the attention module, the input vector is passed through the QKV (Query, Key, Value) matrix to obtain q, k, and v for self-attention calculation. Position encoding is applied only to q and k. Rotational position encoding is applied to the starting and ending position vectors (i.e., the corresponding parts of q and k). The core idea of ​​rotational position encoding is to implement rotational transformations through complex multiplication, incorporating position information into the token representation.

[0088] Specifically, for each dimension (usually even dimensions in pairs), use the rotation matrix R i Perform rotation. Rotation matrix R i Satisfaction relationship The rotation code is:

[0089]

[0090] After rotation encoding, the vectors at the start and end positions can be used to determine the strength of the relationship between them through the inner product calculation. The inner product result not only reflects the content similarity of the tokens, but also their positional relationship.

[0091] Rotated position encoding can capture the relative position information of elements in a sequence, which is crucial for understanding contextual relationships in text. In deep networks, rotated position encoding incorporates position information through multiplication operations, helping to maintain the integrity of position information and reduce losses during information transmission. Traditional Transformer position encoding is mainly targeted at one-dimensional sequences (such as text sequences). Rotated position encoding can be more flexibly applied to multidimensional input data (such as images, videos, etc.). By encoding position information of different dimensions, the model can better understand positional relationships in multidimensional data. Rotated position encoding is deeply integrated with Q and K in the model, truly embedding the rotation operation into the Attention mechanism, thereby strengthening the role of position encoding information.

[0092] S14: Extract based on the subject, the starting coding position and the ending coding position of each subject, and a preset relationship type set to obtain a knowledge triple.

[0093] Traditional information extraction methods typically require first performing entity recognition (NER) on the input sequence to identify the subject and object in the text. Classification models are then used to establish the relationship types between the entities, ultimately yielding triples in the format (subject, relation, object). Because the information extraction and relationship classification processes are independent of each other, this approach struggles to capture the connections between entities and relationships.

[0094] The embodiment of the present application uses a method of entity-relationship joint extraction to extract entities from knowledge texts, that is, the subject and relationship are used as input for object extraction, and the extraction of knowledge triples is completed at one time.

[0095] See Figure 3 As shown in Figure 2, after the knowledge text is encoded by the encoder network, it is sent to the entity joint extraction layer. The entity joint extraction layer establishes multiple relationship extraction heads to extract all existing knowledge triples at once.

[0096] The global pointer network has identified multiple subjects in the text, and the precise position of each subject in the knowledge text (i.e., the starting and ending coding positions) has been determined by rotating the position coding. The relationship type set is predefined and contains all possible relationship types that we want to extract from the knowledge text.

[0097] Furthermore, because the number of target entities (positive labels) to be extracted in a sentence sequence is smaller than the number of non-target entities (negative labels), this class imbalance causes the model to tend to learn features from a larger number of negative labels, affecting classification performance. While data-level manipulations such as undersampling or oversampling can mitigate class imbalance, they can also negatively impact classes with larger sample sizes.

[0098] The model loss function used in the embodiment of the present application is:

[0099]

[0100] in:

[0101] Pα is the head and tail set of all entities of type α in the sample, and Qα is the head and tail set of all non-entities or entities of type other than α in the sample.

[0102] Using the subject's location information and relationship type set, the knowledge text can be further analyzed to determine the relationship between each subject and other entities. Once the relationships between subjects are determined, knowledge triples can be constructed. Knowledge triples consist of a subject, a relationship type (predicate), and an object. Together, these knowledge triples describe a specific piece of knowledge or fact. Finally, the extracted knowledge triples can be output and stored in a structured manner for subsequent analysis and application.

[0103] In an optional embodiment, the method further includes:

[0104] Obtaining a key knowledge set based on the knowledge triples;

[0105] Teaching materials are automatically generated based on the key knowledge set.

[0106] After obtaining the knowledge triples, the extracted knowledge triples are stored in JSON string format and further processed and analyzed. For example, operations such as filtering, merging, and summarizing the knowledge triples are performed to identify key knowledge points and analyze them. Finally, the identified key knowledge points are organized into a set, the "key knowledge set." For example, filtering, merging, and summarizing the knowledge triples can include knowledge points that require special attention and mastery during teaching or learning.

[0107] After obtaining the key knowledge set, the system automatically generates a set of teaching materials that are closely related to the key knowledge set, have a clear structure, and are rich in content, providing learners with effective learning resources and support. These teaching materials may include: courseware and / or teaching tests. This means that the system can automatically generate teaching materials based on the key knowledge set, courseware based on the key knowledge set, or both courseware and test questions based on the key knowledge set.

[0108] The above optional embodiment, by deriving key knowledge sets based on knowledge triples and automatically generating teaching materials based on these key knowledge sets, provides learners with an efficient and personalized learning path and resources. This not only improves the relevance and effectiveness of learning, but also reduces the cost and time of producing teaching materials.

[0109] Figure 4 A flowchart of a method for generating teaching courseware based on a key knowledge set provided in an embodiment of the present application is provided. The method for generating teaching courseware based on a key knowledge set includes the following steps.

[0110] S41 , upon receiving a courseware production instruction input by a first user, selecting a target courseware template from a plurality of preset courseware templates according to the courseware production instruction.

[0111] The first user can be a teaching and training staff, and the first user is the producer and user of teaching courseware.

[0112] The system pre-stores a variety of courseware templates with different styles, layouts, functions and purposes for users to choose from.

[0113] When a teacher (first user) issues a request to create a teaching courseware through the system interface or other means (such as voice input), the courseware creation instruction is triggered. Subsequently, the system receives the courseware creation instruction and selects the most suitable template from multiple preset courseware templates based on the user's requirements (such as the courseware's theme, style, content, etc.) as the target courseware template.

[0114] S42: Reprocess the key knowledge set to obtain a first processed knowledge set.

[0115] The key knowledge set is a collection of key knowledge points extracted from knowledge texts that have an important impact on teaching content.

[0116] Input the key knowledge set into the Tianshu Big Model, and use the Tianshu Big Model to reprocess the key knowledge set. The Tianshu Big Model is an artificial intelligence model based on deep learning technology with powerful semantic understanding and processing capabilities, which is used to reprocess the key knowledge set. The process of reprocessing the key knowledge set by the Tianshu Big Model refers to the process of supplementing and sorting out the key knowledge points in the extracted key knowledge set. For example, for a complex concept, the Tianshu Big Model may add relevant background knowledge, explanations, and case analysis to enhance the integrity and coherence of the knowledge points. At the same time, the Tianshu Big Model will also generate a lesson plan PPT outline based on the logical relationship and importance of the knowledge points (such as Figure 5 After this series of reprocessing operations, the key knowledge set is transformed into a more detailed and complete first-processing knowledge set.

[0117] S43: Generate the teaching courseware based on the first processing knowledge set and the target courseware template.

[0118] After obtaining the first processing knowledge set and the target courseware template, the system will start the process of generating teaching courseware. First, the system will pull the lesson plan PPT outline and key knowledge point analysis content, and fill these contents into the target courseware template according to the instructions of the outline. Then, the system will use its own typesetting and beautification functions to further optimize and adjust the courseware to ensure that the visual effects and user experience of the courseware are optimal. Finally, the system will output the teaching courseware under the user-specified template for use by teaching and training personnel in teaching activities. Teaching courseware is a multimedia file used to assist teaching, containing multiple elements such as text, pictures, audio and video.

[0119] The above embodiment, by following the courseware production instructions, can select a target courseware template that meets the expectations from multiple preset courseware templates, thereby saving the first user's time and energy in designing the template by himself, and improving the efficiency of courseware production; through the reprocessing of the Tianshu large model, the first processed knowledge set not only includes all the key knowledge points in the original key knowledge set, but also adds a lot of useful information and explanations, making the logical relationship between the knowledge points clearer, and the content richer and more complete, providing a solid content foundation for subsequent teaching courseware generation, while also improving the teaching quality of the courseware and the students' learning effects; generating a teaching courseware that meets the teaching needs based on the first processed knowledge set and the target courseware template, realizing the automation and intelligence of courseware production, and improving the efficiency and quality of courseware production.

[0120] Figure 6 A flow chart of a method for generating teaching test questions based on a key knowledge set provided in an embodiment of the present application is provided. The method for generating teaching test questions based on a key knowledge set includes the following steps.

[0121] S61 , upon receiving a test question creation instruction input by a first user, reprocessing the key knowledge set to obtain a second processed knowledge set.

[0122] The test question making instruction indicates that the user wishes to generate a series of teaching test questions based on certain key knowledge.

[0123] When the user selects the automatic question generation function page, the system will pull the extracted key knowledge set and start the test question generation agent (this is a component specifically responsible for generating test questions), thereby sending the key knowledge set into the Tianshu model for processing.

[0124] The Tianshu model will reprocess key knowledge sets. The reprocessing process includes the reorganization, refinement, and association of knowledge in order to generate test questions that better meet teaching needs.

[0125] S62: parsing the test question creation instruction.

[0126] The test question creation instructions are input in text form through a user interface (e.g., a webpage, an application, etc.). After receiving the test question creation instructions, irrelevant characters (e.g., spaces, line breaks, etc.) can be removed and the instructions can be converted to a standard format to ensure the standardization and consistency of the instructions and facilitate subsequent parsing.

[0127] The type of the test question creation instruction can be identified by keywords or specific formats in the test question creation instruction, that is, what type of test question the user wants to generate (such as multiple choice questions, fill-in-the-blank questions, true or false questions, etc.).

[0128] The test creation instructions may include test point information, such as specific knowledge points, chapters, or themes. In addition to test point information, the test creation instructions may also include the number of test questions and the type of test questions. In other embodiments, the test creation instructions may also include other parameters, such as difficulty level, question order, etc.

[0129] Finally, the parsing results are generated based on the parsed instruction content. The parsing results include key information such as the exam question type, test point information, the number and type of questions, and possibly other parameters. The parsing results are stored in a structured format for subsequent use in generating exam questions.

[0130] When the test question creation instruction obtained by parsing includes test points, S63 is executed; when the test question creation instruction obtained by parsing includes the number of test questions and the type of test questions, S64 is executed.

[0131] S63: Generate the teaching test questions based on the test points and the second processing knowledge set.

[0132] If the test question preparation instruction obtained through analysis includes test points, a teaching test question is generated based on the test points and the second processed knowledge set that has been reprocessed previously.

[0133] In practice, the Tianshu Big Model will search for relevant knowledge points in the key knowledge set based on the user's specified test points and generate test questions based on these relevant knowledge points. At the same time, the Tianshu Big Model will also generate corresponding answers and explanations for the test questions, so that users can understand the correct answers and the logic behind them during the learning or testing process.

[0134] S64: Generate the teaching test questions based on the number of test questions, the test question types and the second processing knowledge set.

[0135] If the test question creation instructions obtained by parsing include the number of test questions and the type of test questions, such as Figure 7 As shown, without specifying specific test points, teaching test questions are generated based on the number and type of test questions and the second processing knowledge set.

[0136] In practice, the Tianshu Big Model generates test questions based on the user-specified number and type of questions, randomly selecting knowledge points from key knowledge sets or following a specific strategy. Furthermore, the Tianshu Big Model ensures that the generated questions meet the user's requirements in terms of difficulty and type.

[0137] It should be understood that when generating test questions, the Tianshu Big Model considers multiple factors, including question difficulty, type, and relevance. Based on these factors, it selects appropriate knowledge points from the key knowledge set and generates corresponding test questions. It also supports the creation of a variety of question types, including single-choice, multiple-choice, fill-in-the-blank, judgment, and short-answer questions. This allows users to select the appropriate question type based on their needs, allowing for more flexible generation of teaching and testing questions.

[0138] In the above embodiment, the second processed knowledge set is obtained by reprocessing the key knowledge set. This process improves the utilization rate and conversion efficiency of knowledge. Reprocessing may include the reorganization, refinement, and association of knowledge, so that the knowledge is more structured and systematized, which is convenient for rapid retrieval and matching in the subsequent test question generation process; by parsing the test question production instructions input by the user, and based on the instruction content obtained by the analysis, accurately generate teaching test questions that meet the user's requirements. Whether it is test point-oriented test question generation or test question quantity and test question type-oriented test question generation, the system can ensure that the generated test questions are highly matched with user needs in terms of content, difficulty, type, etc.; by generating teaching test questions in an automated and intelligent way, the workload of teaching and training personnel is greatly reduced and teaching efficiency is improved. At the same time, since the generated test questions are designed based on key knowledge sets and user needs, they can also better meet students' learning needs and improve teaching quality.

[0139] In an optional embodiment, the method further includes:

[0140] receiving a test answer sheet submitted by a second user, wherein the test answer sheet includes answers to subjective questions;

[0141] Splicing the answers to the subjective questions with the corresponding standard answers to obtain spliced ​​answers;

[0142] Input the concatenated answer into the pre-trained fusion CoSENT model to obtain a semantic similarity score;

[0143] A test report is output based on the semantic similarity score.

[0144] The second user may be a student or other test participant. The system receives the test answer sheet submitted by the second user through a user interface (e.g., a webpage, application, etc.). The test answer sheet includes the answers filled in by the second user after completing the test, and may include answers to objective questions (e.g., multiple-choice questions, true-or-false questions) and subjective questions (e.g., short-answer questions, essay questions).

[0145] After the second user completes their test, they submit their answer sheet for scoring. Objective questions are scored directly by comparing the answers on the test sheet with the corresponding standard answers, and the question explanation is provided in the scoring results. For subjective questions, the fused CoSENT model is used to calculate semantic similarity scores or verify whether key knowledge points are answered. Scoring rules can be defined or modified by the first user.

[0146] In one embodiment, the subjective question answer is concatenated with the corresponding standard answer to obtain a concatenated answer. The subjective question answer and the corresponding standard answer can be directly connected or separated and concatenated by a preset separator (such as a line break, a special mark, etc.).

[0147] Load the trained fusion CoSENT model. Input the concatenated answers into the pre-trained fusion CoSENT model. In one embodiment, the standard answers and subjective answers can be pre-processed, for example, by removing irrelevant characters, segmenting words, and removing stop words. The pre-processed standard answers and subjective answers are then concatenated to ensure that the input text format remains consistent with that used during model training.

[0148] The fused CoSENT model calculates the semantic similarity between the subjective answer and the corresponding standard answer based on the concatenated answer and outputs a score (semantic similarity score). This semantic similarity score reflects the semantic closeness between the subjective answer submitted by the second user and the corresponding standard answer.

[0149] Finally, a similarity score threshold (such as 0.8, 0.9, etc.) is set according to actual needs to determine whether the similarity between the answers to the subjective questions and the standard answers meets the requirements. If the semantic similarity score is higher than or equal to the set similarity score threshold, a certain score (such as full marks or close to full marks) is given. If the semantic similarity score is lower than the set similarity score threshold, a corresponding score is given according to the score, or it is determined to be a wrong answer and a lower score is given. A subjective question test report is generated based on the semantic similarity score, an objective question test report is generated based on the objective question score, and the subjective question test report and the objective question test report are merged to generate a test report. The test report includes the user's test results (such as scores, grades, etc.), as well as an analysis of the answers to each subjective question (such as the similarity and differences between the user's answers and the standard answers). The test report can be presented to the first user and / or the second user so that the first user and / or the second user can understand the test situation and the quality of the answers. The above optional embodiment introduces a fusion CoSENT model to calculate the semantic similarity between the answers to subjective questions and the standard answers, thereby providing a more accurate and objective way to evaluate the quality of answers to subjective questions. This not only improves the accuracy and efficiency of the evaluation, but also provides users and teachers with more detailed and comprehensive test reports.

[0150] The following combination Figure 8 To describe the training process of the fused CoSENT model provided in the embodiment of the present application.

[0151] There are two implementation methods for text matching: interactive (interaction-based) and representation-based. Interaction-based approaches combine two sentences into a single sentence and then perform classification based on that single sentence. Representation-based approaches, on the other hand, use an encoder to encode two sentences into sentence vectors, followed by a simple fusion process (typically calculating the cosine coefficient or connecting to a shallow network). While the representation-based approach can pre-calculate and cache sentence vectors, due to the low level of interaction between sentences, it is generally less effective than interactive approaches, especially in scenarios like subjective question scoring, which require high semantic matching accuracy.

[0152] CoSENT is a supervised sentence embedding model that is primarily used to improve the quality of sentence representation. By introducing the cosine similarity loss function, CoSENT optimizes the BERT model's training process, reducing the distance between semantically similar text representations. This results in better performance than Sentence-BERT on multiple datasets. The CoSENT model's loss function is:

[0153]

[0154] Among them, i, j, k, l are four training samples (such as four sentences), ui, uj, uk, ul are the sentence vectors we want to learn (such as the [CLS] vector after BERT), cos represents the cosine similarity of the two vectors, and sim represents the similarity label.

[0155] The loss function is simplified to:

[0156]

[0157] Among them, f(x) is an arbitrary scalar output function (generally no activation function is required), representing the similarity model to be learned.

[0158] See Figure 8 As shown, the prior art is to input two input sequences a and input sequence b into CosENT respectively, and output a similarity score through CosENT. The embodiment of the present application splices the two input sequences a and input sequence b into a new input sequence, inputs the new input sequence into CosENT for training, and then obtains a feature-based similarity calculation model with interactive similarity (fused CosENT model). The fused CosENT model finally constructs a two-node output, then adds softmax, and uses cross entropy (hereinafter referred to as CE) as the loss function.

[0159] In one embodiment, the training process of the fusion CosENT model includes: collecting a large number of sentence pairs (standard answers and test answers) to ensure the diversity and coverage of the data; preprocessing the sentence pairs, including removing irrelevant characters, word segmentation, and stop words; constructing a training data set based on the semantic similarity of the sentence pairs, and the training data set includes positive samples (semantically similar sentence pairs) and negative samples (semantically dissimilar sentence pairs); annotating each sentence pair with a similarity label (such as 1 for similarity and 0 for dissimilarity); selecting a pre-trained BERT model as an encoder; for each sentence pair (sequence a and sequence b), concatenating them into a new input sequence c; inputting the concatenated input sequence c into the BERT model to obtain its encoded vector representation; performing a pooling operation on the encoded vector to generate a sentence-level embedding representation; and training the fusion CoSENT model based on the embedding representation. Among them, the fusion CoSENT model uses cross-entropy (CE) as the loss function. Construct a two-node output layer and use the softmax function for normalization. Calculate the cross-entropy loss based on the probability distribution of the similarity labels (1 or 0) and the model output. Select an optimizer (such as Adam, SGD, etc.) to update the parameters of the fused CoSENT model. Backpropagate the loss value and calculate the gradient. Iterate training based on the gradient until the preset number of iterations is reached or the loss value reaches convergence.

[0160] The fused CoSENT model combines the strengths of both interactive and feature-based approaches, enabling a more comprehensive understanding of the semantic relationships between text (answers to subjective questions and standard answers). Interactive methods typically evaluate semantics by comparing the similarity of words, phrases, or structures within sentences, while feature-based methods focus on extracting key features from the text (such as word vectors and syntactic structures) for comparison. By combining these two approaches, the model can more accurately assess the semantic similarity between answers to subjective questions and standard answers, thereby improving the accuracy of test reports.

[0161] The text information extraction method provided in the embodiment of the present application encodes the knowledge text to obtain a coding vector sequence; named entity recognition is performed based on the coding vector sequence through a global pointer network to obtain multiple subjects and the starting position and ending position of each subject in the knowledge text. The global pointer network uses the information in the coding vector sequence to accurately identify the named entities (i.e., subjects) in the knowledge text and determine the specific positions (starting position and ending position) of these subjects in the text. This recognition method not only improves the accuracy of recognition, but also provides accurate position information for subsequent relationship extraction steps. By performing rotational position encoding on the starting position and ending position, the expressive power of position information can be further enhanced. This encoding method can capture the relative relationship between positions, so that the subsequent relationship extraction step can more accurately understand the spatial relationship between subjects, thereby improving the accuracy of extraction. After obtaining the subject and its accurate position information (starting coding position and ending coding position), combined with a preset relationship type set, the relationship between the subjects can be further extracted to form a knowledge triple. This extraction method not only relies on the semantic information of the subject, but also makes full use of the position information and preset relationship types, thereby improving the accuracy and comprehensiveness of the extraction.

[0162] Figure 9 This is a functional module diagram of the text information extraction device provided in an embodiment of the present application.

[0163] In some embodiments, the text information extraction device 90 may include a plurality of functional modules composed of program code segments. The program code of each program segment in the text information extraction device 90 may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Text information extraction function.

[0164] In this embodiment, the text information extraction device 90 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a text recognition module 901, a text encoding module 902, an entity recognition module 903, a position encoding module 904, a knowledge extraction module 905, a material generation module 906, a score calculation module 907, and a report output module 908. The module referred to in this application refers to a series of computer-readable instruction segments that can be executed by at least one processor and can perform fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0165] The text recognition module 901 is used to obtain an original knowledge document and recognize the original knowledge document to obtain a knowledge text.

[0166] The text recognition module 901 recognizes the original knowledge document to obtain the knowledge text including:

[0167] Performing binary classification on the original knowledge document;

[0168] When the original knowledge document is a picture, a preset first recognition model is used to recognize the original knowledge document to obtain a knowledge text;

[0169] When the original knowledge document is a text type, a preset second recognition model is used to recognize the original knowledge document to obtain a knowledge text.

[0170] The text encoding module 902 is used to encode the knowledge text to obtain an encoding vector sequence;

[0171] The entity recognition module 903 is configured to perform named entity recognition based on the encoding vector sequence through a global pointer network to obtain multiple entities and the starting position and ending position of each entity in the knowledge text;

[0172] The position encoding module 904 is used to perform rotation position encoding on the starting position and the ending position to obtain a starting encoding position and an ending encoding position;

[0173] The knowledge extraction module 905 is a knowledge extraction module, which is used to extract knowledge triples based on the subject, the starting coding position and the ending coding position of each subject, and a preset relationship type set.

[0174] The material generation module 906 is configured to obtain a key knowledge set based on the knowledge triples; and automatically generate teaching materials based on the key knowledge set.

[0175] In one embodiment, the material generation module 906 generates teaching courseware based on the key knowledge set, including:

[0176] When receiving a courseware production instruction input by a first user, selecting a target courseware template from a plurality of preset courseware templates according to the courseware production instruction;

[0177] Reprocessing the key knowledge set to obtain a first processed knowledge set;

[0178] The teaching courseware is generated based on the first processing knowledge set and the target courseware template.

[0179] In another embodiment, the material generation module 906 generates teaching test questions based on the key knowledge set, including:

[0180] Upon receiving a test question creation instruction input by a first user, reprocessing the key knowledge set to obtain a second processed knowledge set;

[0181] Parsing the test question creation instruction;

[0182] When the test question preparation instruction obtained by parsing includes test points, generating the teaching test question based on the test points and the second processing knowledge set;

[0183] When the test question preparation instruction obtained by analysis includes the number of test questions and the type of test questions, the teaching test questions are generated based on the number of test questions, the type of test questions and the second processing knowledge set.

[0184] The score calculation module 907 is used to receive a test answer sheet submitted by a second user, the test answer sheet including answers to subjective questions; concatenate the answers to the subjective questions with the corresponding standard answers to obtain a concatenated answer; and input the concatenated answer into a pre-trained fusion CoSENT model to obtain a semantic similarity score.

[0185] The report output module 908 is configured to output a test report based on the semantic similarity score.

[0186] It should be understood that the various variations and specific embodiments of the text information extraction method provided in the above embodiment are also applicable to the text information extraction device in this embodiment. Through the detailed description of the above text information extraction method, those skilled in the art can clearly understand the implementation process of the text information extraction device in this embodiment. For the sake of brevity of the specification, it will not be described in detail here.

[0187] The text information extraction device provided in the embodiment of the present application encodes the knowledge text to obtain a coding vector sequence; named entity recognition is performed based on the coding vector sequence through a global pointer network to obtain multiple subjects and the starting position and ending position of each subject in the knowledge text. The global pointer network uses the information in the coding vector sequence to accurately identify the named entities (i.e., subjects) in the knowledge text and determine the specific positions (starting position and ending position) of these subjects in the text. This recognition method not only improves the accuracy of recognition, but also provides accurate position information for subsequent relationship extraction steps. By performing rotational position encoding on the starting position and ending position, the expressive power of position information can be further enhanced. This encoding method can capture the relative relationship between positions, so that the subsequent relationship extraction step can more accurately understand the spatial relationship between subjects, thereby improving the accuracy of extraction. After obtaining the subject and its accurate position information (starting coding position and ending coding position), combined with the preset relationship type set, the relationship between the subjects can be further extracted to form a knowledge triple. This extraction method not only relies on the semantic information of the subject, but also makes full use of the position information and the preset relationship type, thereby improving the accuracy and comprehensiveness of the extraction.

[0188] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, all or part of the steps of the text information extraction method are implemented.

[0189] See Figure 10 FIG. 1 is a schematic diagram of the structure of a computer device according to an embodiment of the present application. In a preferred embodiment of the present application, the computer device 100 includes a memory 1001 , at least one processor 1002 , and at least one communication bus 1003 .

[0190] Those skilled in the art should understand that Figure 10 The structure of the computer device shown does not constitute a limitation of the embodiments of the present application. The computer device 100 may also include more or less other hardware or software than shown in the figure, or a different component arrangement.

[0191] In some embodiments, the computer device 100 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The computer device 100 may also include client devices, including, but not limited to, any electronic product capable of human-computer interaction with a client via a keyboard, mouse, remote control, touchpad, or voice-controlled device, such as a personal computer, tablet computer, smartphone, or digital camera.

[0192] It should be noted that the computer device 100 is only an example. Other existing or future electronic products that are suitable for this application should also be included in the scope of protection of this application and included here by reference.

[0193] In some embodiments, the memory 1001 stores a computer program, and when the computer program is executed by the at least one processor 1002, all or part of the steps in the text information extraction method as described above are implemented. The memory 1001 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data. Further, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.

[0194] In some embodiments, the at least one processor 1002 is the control core (Control Unit) of the computer device 100, which uses various interfaces and lines to connect the various components of the entire computer device 100, and executes various functions and processes data of the computer device 100 by running or executing programs or modules stored in the memory 1001, and calling data stored in the memory 1001. For example, when the at least one processor 1002 executes the computer program stored in the memory, it implements all or part of the steps of the text information extraction method described in the embodiment of the present application; or implements all or part of the functions of the text information extraction device. The at least one processor 1002 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.

[0195] In some embodiments, the at least one communication bus 1003 is configured to implement connection and communication between the memory 1001 and the at least one processor 1002, etc. Although not shown, the computer device 100 may also include a power supply (such as a battery) to power each component. Preferably, the power supply can be logically connected to the at least one processor 1002 through a power management device, so that functions such as charging, discharging, and power consumption management are managed through the power management device. The power supply may also include one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The computer device 100 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0196] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, computer device, or network device, etc.) or a processor to execute part of the method described in each embodiment of the present application.

[0197] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is only a logical function division, and other division methods may be used in actual implementation.

[0198] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, and may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of this embodiment based on actual needs.

Claims

1. A text information extraction method, characterized in that: The method comprises: Encode the knowledge text to obtain a coding vector sequence; Performing named entity recognition based on the encoding vector sequence through a global pointer network to obtain multiple subjects and the starting position and ending position of each subject in the knowledge text; Performing rotation position encoding on the starting position and the ending position to obtain a starting encoding position and an ending encoding position; Extraction is performed based on the subject, the starting coding position and the ending coding position of each subject, and a preset relationship type set to obtain knowledge triples.

2. The text information extraction method according to claim 1, characterized in that: The method further comprises: Obtain original knowledge documents; Performing binary classification on the original knowledge document; When the original knowledge document is a picture, a preset first recognition model is used to recognize the original knowledge document to obtain a knowledge text; When the original knowledge document is of text type, a preset second recognition model is used to recognize the original knowledge document to obtain a knowledge text.

3. The text information extraction method according to claim 1, characterized in that: The method further comprises: Obtaining a key knowledge set based on the knowledge triples; Teaching materials are automatically generated based on the key knowledge set.

4. The text information extraction method according to claim 3, characterized in that: The automatically generating teaching materials based on the key knowledge set comprises: Generate teaching courseware based on the key knowledge set; and / or Generate teaching test questions based on the key knowledge set.

5. The text information extraction method according to claim 4, characterized in that: Generating teaching courseware based on the key knowledge set includes: When receiving a courseware making instruction input by a first user, selecting a target courseware template from a plurality of preset courseware templates according to the courseware making instruction; Reprocessing the key knowledge set to obtain a first processed knowledge set; The teaching courseware is generated based on the first processing knowledge set and the target courseware template.

6. The text information extraction method according to claim 4, characterized in that: Generating teaching test questions based on the key knowledge set includes: When receiving the test question making instruction input by the first user, reprocessing the key knowledge set to obtain a second processed knowledge set; Parsing the test question making instruction; When the test question preparation instruction obtained by parsing includes test points, generating the teaching test question based on the test points and the second processing knowledge set; When the test question preparation instruction obtained through analysis includes the number of test questions and the type of test questions, the teaching test question is generated based on the number of test questions, the type of test questions and the second processing knowledge set.

7. The text information extraction method according to claim 6, characterized in that: The method further comprises: receiving a test answer sheet submitted by a second user, wherein the test answer sheet includes answers to subjective questions; Splicing the answers to the subjective questions with the corresponding standard answers to obtain spliced ​​answers; Input the concatenated answer into the pre-trained fusion CoSENT model to obtain a semantic similarity score; A test report is output based on the semantic similarity score.

8. A text information extraction device, characterized in that: The device comprises: The text encoding module is used to encode the knowledge text to obtain an encoding vector sequence; An entity recognition module, used for performing named entity recognition based on the encoding vector sequence through a global pointer network to obtain a plurality of subjects and a starting position and an ending position of each subject in the knowledge text; A position encoding module, used for performing rotation position encoding on the starting position and the ending position to obtain a starting encoding position and an ending encoding position; The knowledge extraction module is used to extract knowledge triples based on the subject, the starting coding position and the ending coding position of each subject and a preset relationship type set.

9. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the text information extraction method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the text information extraction method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Teaching text generation method and system based on natural language processing

    CN120562399A

  • Teaching text generation method and system based on natural language processing

    CN120562399B

  • Electric power transaction knowledge extraction method based on semantic coding and feature enhancement

    CN121543593A