Literature classification method and device, electronic equipment and storage medium
By constructing a standard subject classification system and high-quality training data pairs, the problem of inconsistent subject identification in document classification was solved, thereby improving the classification accuracy and efficiency of the large language model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-12
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, document classification methods rely on manual annotation and rule matching, which makes it difficult to guarantee the consistency of subject classification standards and classification efficiency. Furthermore, large language models lack a unified standard training dataset, resulting in insufficient accuracy in document classification.
A standard subject classification system is constructed. Target documents that meet preset conditions are extracted, and the original subject identifiers are processed based on standard subject identifiers. High-quality training data pairs are constructed, and a large model is generated by iteratively training the model.
This improved the accuracy and efficiency of document classification, ensured the standardization of subject identification for documents from different sources, and enhanced the classification performance of the large language model.
Smart Images

Figure CN121833962A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a document classification method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid increase in global scientific literature, accurate and efficient classification of literature by discipline has become a core task of scientific research information management. Traditional classification methods include manual annotation and rule matching. Manual annotation involves domain experts manually labeling documents with discipline identifiers based on their professional knowledge. However, this method relies on subjective judgment, making it difficult to ensure consistency in discipline classification standards, and its classification efficiency is low. Rule matching involves pre-defining a list of keywords corresponding to each discipline, and determining the discipline of a document by matching its content with the keyword list. However, this method also has relatively low classification efficiency.
[0003] Currently, with the development of large language models, their powerful semantic understanding and reasoning capabilities offer new pathways for document classification. When using large language models for document classification, it's necessary to first use the documents and pre-annotated subject labels as a training dataset to train the large language model. However, the current subject labels for documents are quite disorganized and lack a unified standard, resulting in poor quality training datasets. This makes it difficult to effectively train large language models and limits the accuracy of document classification using them.
[0004] Therefore, there is an urgent need to provide a document classification method to improve the accuracy of document classification. Summary of the Invention
[0005] In view of this, this application provides a document classification method, the method comprising: Construct a standard subject classification system, wherein the standard subject classification system includes at least a standard subject identifier that uniquely corresponds to the subject; Extract target documents that meet preset conditions from the literature, wherein the preset conditions are that at least one of the original subject identifiers of the documents is consistent with the standard subject identifier; Based on the standard subject identifier, the original subject identifier of the target document is processed to obtain the target subject identifier of the target document under the standard subject classification system; The target documents and the target subject identifiers are used to form training data pairs; Using the training data pairs, iteratively train the specified large model until the training termination condition is met and the document classification model is obtained. The documents to be classified are input into the document classification model to determine the subject identifier of the documents to be classified.
[0006] Optionally, the step of processing the original subject identifier of the target document based on the standard subject identifier to obtain the target subject identifier of the target document under the standard subject classification system includes: The original subject identifiers of the target documents are combined into a set of original subject identifiers; Use any one of the original subject identifiers from the original subject identifier set as the current subject identifier; Determine whether there exists an identifier in the standard subject identifiers that is consistent with the current subject identifier; If it exists, then the current subject identifier will be used as one of the target subject identifiers; If it does not exist, the current subject identifier will be removed; Take any unselected original subject identifier from the original subject identifier set as the current subject identifier; and return to the step of determining whether there is an identifier in the standard subject identifiers that is consistent with the current subject identifier, until all the original subject identifiers are selected.
[0007] Optionally, each of the disciplines is pre-divided into different discipline levels; the standard discipline classification system also includes the parent discipline identifier of each discipline; Correspondingly, after using the current subject identifier as the target subject identifier, the method further includes: Use the current subject identifier as the current sub-level subject identifier; From the standard subject classification system, extract the current parent subject identifier of the current sub-level subject identifier; and use the current parent subject identifier as one of the target subject identifiers; Determine whether the subject level corresponding to the current parent subject identifier is the highest subject level; the highest subject level is the level that has no parent subject. If so, proceed to the step of using any unselected original subject identifier from the original subject identifier set as the current subject identifier; If not, then the current parent subject identifier is used as the current child subject identifier, and the step of extracting the current parent subject identifier of the current child subject identifier from the standard subject classification system is returned.
[0008] Optionally, after determining the target subject identifier, the method further includes: Determine the target subject level corresponding to the target subject identifier; The target subject identifier is stored in a target identifier list corresponding to the target subject level; the target subject level corresponds one-to-one with the target identifier list. For each of the target identifier lists, identify the same target subject identifiers in the target identifier lists, and remove duplicate target subject identifiers to obtain the final target identifier list; Correspondingly, the target documents and the target subject identifier are used to form training data pairs, including: The target documents and the list of target identifiers are used to form the training data pairs.
[0009] Optionally, the construction of the standard subject classification system includes: Obtain the subject classification and code file; the subject classification and code file includes the first-level subject identifier corresponding to the first-level subject, the second-level subject identifier corresponding to the second-level subject, and the third-level subject identifier corresponding to the third-level subject; the subject identifier includes the subject name and the subject code; The identifiers containing preset keywords in the three-level subject identifiers are used as fuzzy subject identifiers; and the fuzzy subject identifiers in the subject classification and code files are deleted to obtain the initial subject classification system. The subject names in the initial subject classification system are translated, and the translated subject names are added to the corresponding subject identifiers to obtain the standard subject classification system.
[0010] Optionally, the step of iteratively training a specified large model using the training data pairs until the training termination condition is met and a document classification model is obtained includes: The training data is input into a pre-trained teacher model to obtain distilled data generated by the teacher model; the distilled data is the reasoning chain data for determining the target document's correspondence to the target subject identifier. The standard subject classification system and the target document are input into the student model to obtain the predicted subject identifier determined by the student model for the target document from the standard subject classification system. A loss function is constructed based on the predicted subject identifier, the target subject identifier, and the distillation data; With the goal of minimizing the loss function, the parameters of the student model are adjusted to obtain the document classification model.
[0011] Optionally, the step of inputting the document to be classified into the document classification model and determining the subject identifier of the document to be classified includes: Based on the pre-constructed first prompt word template, the standard subject classification system, and the document to be classified, a first prompt word is generated; and based on the first prompt word, an initial subject identifier is determined for the document to be classified through the document classification model. Based on the pre-constructed second prompt word template, the document to be classified, and the initial subject identifier, a second prompt word is generated; and based on the second prompt word, the reflective reasoning result corresponding to the initial subject identifier is determined through the document classification model; the reflective reasoning result includes a first result indicating that the initial subject identifier meets the specified conditions, and a second result indicating that the initial subject identifier does not meet the specified conditions; If the result of the reflective reasoning is the first result, then the initial subject identifier is used as the subject identifier of the document to be classified; If the result of the reflective reasoning is the second result, then a third prompt word is generated based on the pre-constructed third prompt word template and the unmet conditions to be improved in the specified conditions; based on the third prompt word, the subject identifier that meets the conditions to be improved is determined through the document classification model, and the subject identifier of the document to be classified is obtained.
[0012] This application also provides a document classification device, the device comprising: The standard system construction module is used to construct a standard subject classification system, wherein the standard subject classification system includes at least a standard subject identifier that uniquely corresponds to the subject. The target document extraction module is used to extract target documents from documents that meet preset conditions, wherein the preset conditions are that at least one of the original subject identifiers pre-annotated to the document is consistent with the standard subject identifier. The target identifier determination module is used to process the original subject identifier of the target document based on the standard subject identifier to obtain the target subject identifier of the target document under the standard subject classification system. The training data pair construction module is used to construct training data pairs by pairing the target documents with the target subject identifiers; The model training module is used to iteratively train a specified large model using the training data pairs until the training termination condition is met and a document classification model is obtained. The classification module is used to input the documents to be classified into the document classification model and determine the subject identifier of the documents to be classified.
[0013] This application also provides an electronic device, including: Memory, used to store computer programs; A processor for executing the computer program to implement any of the above-described document classification methods.
[0014] This application also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described document classification methods.
[0015] In summary, this application provides a document classification method, apparatus, electronic device, and storage medium. It constructs a standard subject classification system that includes at least one standard subject identifier uniquely corresponding to each subject. Target documents meeting preset conditions are extracted; the preset condition is that at least one of the original subject identifiers pre-labeled for the documents matches the standard subject identifier. Based on the standard subject identifier, the original subject identifiers are processed to obtain the target subject identifier of the target document within the standard subject classification system. This is equivalent to using the standard subject classification system as a unified standard for document classification, standardizing the subject identifiers of documents from different sources, so as to form high-quality training data pairs between target documents and target subject identifiers. The training data is used to train a specified large model to obtain a document classification model, improving the model's classification performance. The document classification model is used to determine the subject identifier of the document to be classified, ensuring the accuracy of document classification. Attached Figure Description
[0016] Figure 1 A first flowchart illustrating a document classification method provided in this application; Figure 2 A second flowchart illustrating a document classification method provided in this application; Figure 3 A schematic diagram of the third process of a document classification method provided in this application; Figure 4 A schematic diagram of a document classification device provided in this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation
[0017] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0018] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0019] Please refer to Figure 1 , Figure 1 A first flowchart illustrating a document classification method provided in this application, the method comprising: S101. Construct a standard subject classification system, which shall include at least a standard subject identifier that uniquely corresponds to each subject.
[0020] Currently, different scientific literature retrieval websites use inconsistent subject classification systems, leading to a chaotic situation with a massive amount of scientific literature. To address this, this application first constructs a standard subject classification system; the standard subject classification system includes at least a standard subject identifier uniquely corresponding to each subject; the standard subject identifier can be a subject name and / or a subject code. The specific method for constructing the standard subject classification system will be explained in subsequent embodiments and will not be elaborated here.
[0021] S102. Extract target documents from the literature that meet the preset conditions, wherein the preset conditions are that at least one of the original subject identifiers marked for the documents is consistent with the standard subject identifier.
[0022] The aforementioned literature includes, but is not limited to, dissertations, journal articles, conference papers, and books, and the specific categories of literature can be set according to actual needs. The sources of the literature can be scientific literature websites (including but not limited to Springer, Elsevier, Web of Science, Open Access Dissertations OATD, ISBNDB, WorldCat, etc.) or pre-built literature databases, etc., and this application does not make any special restrictions on them.
[0023] Taking scientific literature websites as an example, these websites typically pre-label the original subject categories of the literature. However, different websites use different subject classification systems, leading to confusion in the original subject categories. In this embodiment, an automated web crawler (Selenium, pyautogui, and Playwright, etc.) is used to sequentially input standard subject categories on the advanced search page of the scientific literature website to retrieve target literature that meets preset conditions. The preset condition is that at least one of the original subject categories in the literature matches the input standard subject category.
[0024] In addition, for websites that limit search results per search, restrictions on the publication date of the literature can be added to obtain cutting-edge scientific literature, so as to use the target literature to build high-quality training data pairs.
[0025] Furthermore, the target document can be the full text or only contain key content such as the title and abstract; this application does not impose any particular limitation on this. For example, the title and abstract of the target document can be extracted from the document details page of a scientific literature website using style selectors, ID selectors, or XPath selectors. Of course, it is also necessary to extract the original subject identifier of the target document from the scientific literature website so that the original subject identifier can be processed subsequently to obtain the target subject identifier of the target document under the standard subject classification system.
[0026] Finally, the following is an example of target document A and its original subject label extracted from the scientific literature website: {Title: SHRIMP U-Pb zircon ages of volcanic ash identified in the Yahe section of the Lushan Basin and their significance as regional stratigraphic markers;} Abstract: Three layers of volcanic ash were discovered in the central part of the Yahe section in the Liushan Basin, Nanzhao County, Henan Province. This paper reports the U-Pb ages of zircons isolated from one of the volcanic ash layers, obtained using a sensitive high-resolution ion probe microanalysis (SHRIMP-II). The weighted average age of 206Pb / 238U obtained from thirteen analyses is 237 ± 2.5 million years (95% confidence level, weighted mean square deviation = 0.72). This age indicates that the stratigraphic deposition in the Yahe section dates back to the Middle Triassic. The new SHRIMP U-Pb data from the Yahe section volcanic ash provide a strong age constraint for the Triassic stratigraphic division of the Liushan Basin. By comparing the reported ages with similar volcanic ash in the surrounding areas of the Liushan Basin, we infer that these volcanic ash layers may be a depositional response to the first phase of the Indosinian Orogeny and can serve as marker layers for regional stratigraphic correlation. Link to the document details page: https: / / link.springer.com / article / 10.1007 / s12517-013-1157-1; Original subject labels: ["Archaeology", "Earth Science", "Geology", "Historical Geology", "Prehistoric Archaeology" and "Structuration"]}.
[0027] S103. Based on the standard subject identifier, process the original subject identifier of the target document to obtain the target subject identifier of the target document under the standard subject classification system.
[0028] As mentioned earlier, target documents on scientific literature websites are pre-labeled with original subject identifiers. However, different scientific literature websites use different subject classification systems, resulting in inconsistent original subject identifiers for various target documents. Therefore, this application processes the original subject identifiers of target documents based on standard subject identifiers. For example, by comparing the original subject identifiers with the standard subject identifiers, original subject identifiers that are identical to the standard subject identifiers are retained, while those that differ from the standard subject identifiers are deleted. Using the standard subject identifiers as a benchmark, the original subject identifiers of target documents are processed to obtain the target subject identifiers of the target documents under the standard subject classification system, thereby standardizing the subject identifiers of target documents from different sources.
[0029] The specific process for determining the target subject identifier of the target document will be explained in subsequent embodiments, and will not be repeated here.
[0030] S104. Combine the target literature with the target subject identifier to form training data pairs.
[0031] S105. Using the training data pairs, iteratively train the specified large model until the training termination condition is met and the document classification model is obtained.
[0032] After the above steps, even if the target documents originate from different scientific literature websites, their target subject identifiers are all based on the standard subject classification system. Therefore, pairing the target documents with their target subject identifiers to form training data pairs ensures the quality of the training data pairs.
[0033] High-quality training data pairs are used to iteratively train a pre-built, specified large model to ensure the effectiveness of the training. The specified large model that reaches the training termination condition is used as the document classification model to ensure the document classification performance of the document classification model and improve the accuracy of document classification.
[0034] The training process for a specified large model will be described in subsequent implementation examples, and will not be repeated here.
[0035] S106. Input the documents to be classified into the document classification model and determine the subject identifier of the documents to be classified.
[0036] After obtaining the above-mentioned document classification model, the documents to be classified are input into the document classification model to determine their subject identifiers, thus achieving document classification. The process of the document classification model determining the subject identifiers of the documents to be classified will be explained in subsequent embodiments and will not be elaborated here.
[0037] In summary, this application provides a document classification method. First, a standard subject classification system is constructed; this system includes at least one standard subject identifier uniquely corresponding to each subject. Target documents meeting preset conditions are extracted; these conditions stipulate that at least one of the original subject identifiers pre-labeled for the documents matches the standard subject identifier. Based on the standard subject identifier, the original subject identifiers are processed to obtain the target subject identifier for the target document within the standard subject classification system. This essentially uses the standard subject classification system as a unified standard for document classification, standardizing the subject identifiers of documents from different sources, thus enabling the formation of high-quality training data pairs between target documents and their target subject identifiers. The training data is used to train a specified large model, resulting in a document classification model and improving its classification performance. Finally, the document classification model is used to determine the subject identifier of the documents to be classified, ensuring the accuracy of document classification.
[0038] Based on the above embodiments: As an optional implementation, a standard subject classification system is constructed, including: Obtain the subject classification and code file; the subject classification and code file includes the first-level subject identifier corresponding to the first-level subject, the second-level subject identifier corresponding to the second-level subject, and the third-level subject identifier corresponding to the third-level subject; the subject identifier includes the subject name and the subject code; The identifiers containing preset keywords in the three-level subject identifiers are used as fuzzy subject identifiers; and the fuzzy subject identifiers in the subject classification and code files are deleted to obtain the initial subject classification system. The subject names in the initial subject classification system are translated, and the translated subject names are added to the corresponding subject identifiers to obtain the standard subject classification system.
[0039] In this embodiment, a standard subject classification system is constructed based on the "Subject Classification and Codes" (GB / T13745-2009) document downloaded from the Standard Information Public Service Platform.
[0040] In the subject classification and code document, each subject is divided into first-level subjects, second-level subjects, and third-level subjects. Among them, first-level subjects are the highest level of subjects, mainly covering broad subject categories; second-level subjects are sub-subjects of first-level subjects, which are equivalent to a more refined division of first-level subjects, and usually correspond to a complete subject system; third-level subjects are sub-subjects of second-level subjects, which are equivalent to a more refined division of second-level subjects, and usually correspond to specific research directions or branches.
[0041] The subject classification and code file records the subject name and subject code, i.e., the subject identifier, for each subject. This file includes first-level subjects such as Mathematics-110, Information Science and Systems Science-120, Physics-140, and Earth Science-170. Taking Earth Science-170 as an example, its corresponding second-level subjects include History of Earth Science-17010, Atmospheric Science-17015, Solid Earth Science-17020, and Space Physics-17025. Taking Atmospheric Science-17015 as an example, its corresponding third-level subject includes Atmospheric Physics A0111.
[0042] After obtaining the aforementioned subject classification and code files, the text information can be extracted using OCR (Optical Character Recognition) technology or manual recognition. Depending on the actual document classification needs, subject names and codes can be selectively extracted; this embodiment does not impose any particular limitations on this.
[0043] In this embodiment, the three-level subject identifiers are traversed, and regular expressions are used to determine whether the subject name of the three-level subject identifier contains preset keywords. The preset keywords are semantically ambiguous and broadly descriptive, and can be set according to actual needs. For example, the preset keywords include "other", "comprehensive", "integrated" and "Other".
[0044] The third-level subject identifiers containing the aforementioned preset keywords within the subject name are designated as fuzzy subject identifiers. For example, "other disciplines in atmospheric science" and "other disciplines in partial differential equations" are both fuzzy subject identifiers. Fuzzy subject identifiers can only be assigned to their corresponding second-level disciplines, and target literature marked with fuzzy subject identifiers cannot be found on authoritative scientific literature websites. Therefore, fuzzy subject identifiers need to be deleted, thus obtaining the initial subject classification system.
[0045] Furthermore, this embodiment translates the subject names in the initial subject classification system and adds the translated subject names to the corresponding subject identifiers to obtain a standard subject classification system, thus expanding the applicability of the standard subject classification system. This embodiment does not restrict the language used for translation; it can be set according to actual needs.
[0046] As an optional implementation, a dual-track translation strategy is employed to translate the subject names in the initial subject classification system. Specifically, the translation corresponding to the subject name is first searched in a professional terminology database (such as the English-Chinese Dictionary of Science and Technology); for subject names that cannot be found in the professional terminology database (such as emerging disciplines), a large language model is used to translate the subject name, and the translation is manually verified by domain experts to obtain the translated subject name.
[0047] In addition, the standard subject identifiers in the standard subject classification system can be divided into different standard identifier lists according to the subject hierarchy. As an optional embodiment, the standard subject identifiers of the first-level subjects are divided into the first-level standard identifier list, the standard subject identifiers of the second-level subjects are divided into the second-level standard identifier list, and the standard subject identifiers of the third-level subjects are divided into the third-level standard identifier list, obtaining the standard subject classification system A1 with the following structure: {First-level subjects: [{Code: 170, Chinese: Earth Science, English: Earth Science};...]; Second-level subjects: [{Code: 17015, Chinese: Atmospheric Science, English: Atmospheric Science};...]; Third-level subjects: [{Code: A0111, Chinese: Atmospheric Physics, English: Atmospheric Physics};...]}.
[0048] The process of determining the target subject identifier of the target document will be described below.
[0049] Please refer to Figure 2 , Figure 2 which is the second process schematic diagram of a document classification method provided for this application.
[0050] As an optional embodiment, based on the standard subject identifier, the original subject identifier of the target document is processed to obtain the target subject identifier of the target document under the standard subject classification system, including: S201. Form the original subject identifier set from the original subject identifiers of the target document; S202. Take any one of the original subject identifiers in the original subject identifier set as the current subject identifier; S203. Determine whether there is an identifier in the standard subject identifier that is the same as the current subject identifier; if so, go to S204; if not, go to S205; S204. Take the current subject identifier as one of the target subject identifiers; S205. Remove the current subject identifier; S206. Take any one of the unselected original subject identifiers in the original subject identifier set as the current subject identifier; and return to the step of determining whether there is an identifier in the standard subject identifier that is the same as the current subject identifier until all the original subject identifiers are selected.
[0051] Considering that scientific and technological literature websites usually label multiple original subject identifiers for documents, in this embodiment, the original subject identifiers are formed into an original subject identifier set, so as to take the identifiers in the set as the current subject identifier one by one and compare the current subject identifier with each standard subject identifier.
[0052] If there is an identifier in the standard subject identifier that is the same as the current subject identifier, then retain the current subject identifier, that is, use the current subject identifier as one of the target subject identifiers of the target document; if there is no identifier in the standard subject identifier that is the same as the current subject identifier, then remove the current subject identifier, that is, consider that the current subject identifier does not conform to the standard subject classification system.
[0053] Repeat the above steps until all the original subject identifiers are selected and the above comparison is completed, and the target subject identifier of the target document is obtained.
[0054] In summary, in this embodiment, retain the identifiers in the original subject identifiers that overlap with the standard subject identifier, and remove the identifiers in the original subject identifiers that do not overlap with the standard subject identifier, to obtain the target subject identifier of the target document.
[0055] As an optional embodiment, each subject is pre-divided into different subject levels; the standard subject classification system further includes the parent subject identifier of the subject; Correspondingly, after using the current subject identifier as the target subject identifier, it further includes: Use the current subject identifier as the current sub-subject identifier; Extract the current parent subject identifier of the current sub-subject identifier from the standard subject classification system; and use the current parent subject identifier as one of the target subject identifiers; Determine whether the subject level corresponding to the current parent subject identifier is the highest subject level; the highest subject level is the level without a parent subject; If so, enter the step of using any unselected original subject identifier in the set of original subject identifiers as the current subject identifier; If not, use the current parent subject identifier as the current sub-subject identifier, and return to the step of extracting the current parent subject identifier of the current sub-subject identifier from the standard subject classification system.
[0056] In this embodiment, each subject under the standard subject classification system is divided into different subject levels. In addition to including the standard subject identifier uniquely corresponding to the subject, the standard subject classification system also includes the parent subject identifier of the subject. The parent subject of a subject is the upper-level subject to which the subject belongs, and the parent subject identifier is the identifier of the parent subject.
[0057] For example, in the standard subject classification system A1, add the parent subject identifier corresponding to the subject to obtain the standard subject classification system A2 with the following structure: {First-level subject: [{Code: 170, Chinese: Earth Science, English: Earth Science};...]; Secondary discipline: [{Code: 17015, Chinese: Atmospheric Science, English: Atmospheric Science}, Parent discipline identifier: 170]; … Tertiary discipline: [{Code: A0111, Chinese: Atmospheric Physics, English: Atmospheric Physics, Parent discipline identifier: 17015}; …].
[0058] It can be understood that the parent discipline identifier of the secondary discipline Atmospheric Science is 170, indicating that Atmospheric Science belongs to the primary discipline Earth Science 170; the parent discipline identifier of the tertiary discipline Atmospheric Physics is 17015, indicating that Atmospheric Physics belongs to the secondary discipline Atmospheric Science 17015.
[0059] Based on this, this embodiment also uses the parent discipline identifier to supplement the target discipline identifier of the target document. Specifically, after determining that there is an identifier in the standard discipline identifier that is the same as the current discipline identifier, further use the current discipline identifier as the current sub-discipline identifier; extract the current parent discipline identifier of the current sub-discipline identifier from the standard discipline classification system; and use the current parent discipline identifier as one of the target discipline identifiers to supplement the target discipline identifier of the target document. After that, use the current parent discipline identifier as the new current sub-discipline identifier, and continue to extract its current parent discipline identifier until the discipline level corresponding to the current parent discipline identifier is the highest discipline level.
[0060] Taking the construction of the standard discipline classification system based on the "Classification and Codes of Disciplines" as an example, the primary discipline is the highest discipline level in the standard discipline classification system. The primary discipline is the parent discipline of the secondary discipline, and the secondary discipline is the parent discipline of the tertiary discipline. If the current sub-discipline identifier is a tertiary discipline identifier, then supplement the secondary discipline identifier to which the current sub-discipline identifier belongs as the target discipline identifier of the target document; if the current sub-discipline identifier is a secondary discipline identifier, then supplement the primary discipline identifier to which the current sub-discipline identifier belongs as the target discipline identifier of the target document; until the current sub-discipline identifier is a primary discipline identifier.
[0061] In summary, in this embodiment, further use the parent discipline identifiers of each discipline identifier to supplement the target discipline identifier of the target document, form a multi-disciplinary level discipline identifier, and improve the quality of the training data pair.
[0062] As an optional embodiment, after determining the target discipline identifier, it further includes: Determine the target discipline level corresponding to the target discipline identifier; Store the target discipline identifier into the target identifier list corresponding to the target discipline level; the target discipline level and the target identifier list correspond one by one; For each list of target identifiers, identify the same target subject identifiers in the list and remove duplicates of the same target subject identifiers to obtain the final list of target identifiers; Correspondingly, the target literature and target subject identifiers are paired to form training data pairs, including: The target documents are paired with a list of target identifiers to form training data pairs.
[0063] Considering the large number of target subject identifiers in the target documents, this embodiment further stores the target subject identifiers hierarchically according to subject level, forming a multi-level target identifier list.
[0064] Specifically, disciplines in the standard subject classification system are divided into different subject levels, with each subject level corresponding to a list of identifiers. Adaptively, for each target subject identifier, the subject level to which the target subject identifier belongs is designated as the target subject level; the list of identifiers corresponding to the target subject level is designated as the target identifier list; and the target subject identifier is stored in its corresponding target identifier list. Furthermore, considering that the target identifier list may contain both original subject identifiers and identifiers supplemented based on parent subject identifiers, the identifiers in the target identifier list are deduplicated to obtain the final target identifier list.
[0065] Taking target document A as an example, the target subject identifier of target document A is determined according to the above embodiments, and the training data consisting of target document A and its target subject identifier is as follows: {Title: "SHRIMP U-Pb zircon ages of volcanic ash identified in the Yahe section of the Lushan Basin and their significance as regional stratigraphic markers";} Abstract: "Three layers of volcanic ash were discovered in the central part of the Yahe section in the Liushan Basin, Nanzhao County, Henan Province. This paper reports the U-Pb ages of zircons isolated from one of the volcanic ash layers, obtained using a sensitive high-resolution ion probe microanalysis (SHRIMP-II). The weighted average age of 206Pb / 238U obtained from thirteen analyses is 237 ± 2.5 million years (95% confidence level, weighted mean square deviation = 0.72). This age indicates that the stratigraphic deposition in the Yahe section dates back to the Middle Triassic. The new SHRIMP U-Pb data on the volcanic ash from the Yahe section provide a strong age constraint for the Triassic stratigraphic division of the Liushan Basin. By comparing the reported ages with similar volcanic ash in the surrounding areas of the Liushan Basin, we infer that these volcanic ash layers may be a sedimentary response to the first phase of the Indosinian Orogeny and can serve as marker layers for regional stratigraphic correlation." "Link to document details page": "https: / / link.springer.com / article / 10.1007 / s12517-013-1157-1"; “Target Discipline Identifiers”: {List of Level 1 Target Identifiers: [Earth Sciences]; List of Level 2 Target Identifiers: [Geology]; List of Level 3 Target Identifiers: [Structuration and Historical Geology]}}.
[0066] In summary, through the above embodiments, based on standard subject identifiers, the original subject identifiers are processed to obtain multi-level target subject identifiers for the target documents under the standard subject classification system, thereby constructing high-quality training data pairs for effective training of the specified large model. Furthermore, a stratified sampling strategy can be adopted to randomly divide the training data pairs into training and test sets according to a certain proportion, ensuring that the training data pairs for each subject are randomly distributed.
[0067] The training process for a specified large model is explained below.
[0068] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the third process of a document classification method provided in this application.
[0069] As an optional implementation, the specified large model is iteratively trained using training data pairs until the training termination condition is met and a document classification model is obtained, including: S301. Input the training data into the pre-trained teacher model to obtain the distilled data generated by the teacher model; the distilled data is the reasoning chain data for determining the target subject identifier corresponding to the target document. S302. Input the standard subject classification system and the target document into the student model to obtain the predicted subject identifier determined by the student model for the target document from the standard subject classification system; S303. Construct a loss function based on the predicted subject identifier, the target subject identifier, and the distillation data; S304. Adjust the parameters of the student model with the goal of minimizing the loss function to obtain the document classification model.
[0070] In this embodiment, a pre-trained teacher model is first used to generate distillation data based on training data pairs. The distillation data is the reasoning chain data for determining the target subject identifier corresponding to the target document.
[0071] This embodiment does not limit the type of teacher model. For example, Qwen or Kimi 2 are acceptable. Teacher models obtained from Huggingface or ModelScope are deployed using inference frameworks such as VLLM (Very Large Language Model). The deployment method for the teacher models is also not particularly limited in this embodiment. For example, eight NVIDIA V100 32GB GPUs can be used, with a tensor parallel size of 8 and a maximum GPU memory utilization of 0.85, to perform a distributed deployment of the teacher inference model.
[0072] This embodiment does not impose any particular limitations on the method by which the teacher model generates the aforementioned distillation data. For example, a distillation prompt template could be set as follows: You are a subject classification expert in scientific literature, skilled at providing the thought process and basis for why a document belongs to the following subject [%s] based on its title and abstract. The title of the document is [%s], and the abstract of the document is [%s].
[0073] For example, based on the distillation prompt template above, generate the distillation prompt for target document B: {You are an expert in subject classification of scientific and technological literature, skilled at identifying the subject of a document based on its title and abstract: "{First-level target identifier list: [Earth Science]; Second-level target identifier list: [Geology; Solid Earth Geophysics]; Third-level target identifier list: [Structuration and Historical Geology; Geomorphology; Geodynamics]}"; The title of this paper is: "Modeling of Morphological Patterns of River Erosion Thermomelane Plains Based on Remote Sensing Data"; The abstract of this paper states: "The aim of this study is to mathematically model the morphological pattern development of thermocline plains with river erosion using remote sensing data based on landscape mathematical morphology methods, and to present the results. A theoretical analysis yields a morphological pattern development model for thermocline plains with river erosion, which has been empirically tested at several key locations. The analysis results show that the theoretical results regarding the distribution of regional indices in the Hassire plain are empirically verified in different natural geographical, geological, and permafrost environments, and the distribution of thermocline lakes within the thermocline plain conforms to both gamma and log-normal distributions. The study indicates that the distribution of the average radius and diameter of the Hassire plain should follow a Rayleigh distribution. This analysis shows that variants of synchronously initiated thermocline processes are most common at the locations considered. The model also allows us to assess the dynamic parameters of the process using landscape indices from single-time slices."
[0074] Inputting the above distillation prompts into the teacher model yields the following distillation data: {First-level discipline: Earth Sciences. This study focuses on thermocline plains, exploring the evolution of landforms under the combined effects of river erosion and permafrost thawing, representing a typical study of Earth's surface system processes. The research involves multiple spheres of elements, including physical geography, geology, and permafrost environment, fully aligning with the scope of Earth science research.}
[0075] Secondary Discipline: Geology. Core Reason: Meltplains are products of surface geological processes, and their formation and evolution are directly controlled by geological processes such as permafrost distribution, underground ice melting, and surface sediment redistribution. Research on establishing morphological pattern development models using remote sensing data is essentially a quantitative description of the mechanisms of modern geomorphological evolution. It belongs to the interdisciplinary field of dynamic geomorphology and Quaternary geology and is an important branch of geology.
[0076] Secondary Discipline: Solid Earth Geophysics. Core Reason: Thermomelactic processes involve physical mechanisms such as surface heat flow, changes in the thermo-mechanical properties of permafrost, and surface deformation. Statistical analyses in this study, such as the "Hassley regional index distribution" and the "gamma / log-normal distribution of thermomelt lakes," reflect the spatial self-organization of surface physical processes. This falls within the research scope of cryosphere geophysics and surface process dynamics, and represents an extension of solid earth geophysics into the study of surface processes.
[0077] Third-level discipline: Geomorphology. Its core focus: The phrases "morphological pattern development" in the literature titles and "morphological pattern development of thermomelt plains" in the abstracts directly correspond to the core task of geomorphology—studying the occurrence, development, and distribution patterns of landforms. River erosion, as a geomorphic force, and thermomelt plains, as a special landform type, both have spatial patterns and evolutionary modeling that are typical contents of quantitative geomorphology.
[0078] Third-level discipline: Geodynamics. Core rationale: The study reveals the surface dynamics process involving the coupling of thermal energy and hydrodynamics. The abstract points out that "variants of synchronously initiated thermomelting processes are the most common," indicating that this process involves internal energy conversion and self-organizing criticality within the system, falling under the category of surface dynamics research. Utilizing landscape indicators to assess process dynamic parameters is a methodological embodiment of process-response models in geodynamics.
[0079] Third-level discipline: Stratigraphy and Historical Geology. Auxiliary classification: This discipline's categorization is relatively indirect. However, through quantitative modeling of modern processes, the research provides a theoretical basis for identifying ancient thermokeratomorphic landforms and reconstructing Quaternary paleoenvironments by relating the present to the past. The evolutionary sequence of thermokeratomorphic plains itself constitutes a geomorphic generational relationship, sharing methodological commonalities with the time series analysis of historical geology.
[0080] Furthermore, the standard subject classification system and target literature are input into the student model to obtain the predicted subject identifiers determined by the student model for the target literature from the standard subject classification system. Based on the predicted subject identifiers and target subject identifiers from the distillation data, the lightweight student model is subjected to supervised fine-tuning to obtain the subject classification model.
[0081] This embodiment does not impose any special limitations on the process by which the student model generates the predicted subject identifiers. For example, a prediction prompt template could be set as follows: You are an expert in the subject classification of scientific literature. You are skilled at accurately identifying which first-level, second-level, and third-level disciplines a document belongs to under the standard subject classification system based on its title and abstract, and returning the predicted multi-level subject identifiers in JSON format. The complete standard subject classification system includes [%s].
[0082] For example, based on the above prediction prompt template, the prediction prompts for target document C are generated as follows: The title of the document is: SHRIMP U-Pb zircon ages of volcanic ash identified in the Yahe section of the Lushan Basin and their significance as regional stratigraphic markers. The abstract of the literature is as follows: Three layers of volcanic ash were discovered in the central part of the Yahe section in the Liushan Basin, Nanzhao County, Henan Province. This paper reports the U-Pb ages of zircons isolated from one of the volcanic ash layers, obtained using a sensitive high-resolution ion probe microanalysis (SHRIMP-II). The weighted average age of 206Pb / 238U obtained from thirteen analyses is 237 ± 2.5 million years (95% confidence level, weighted mean square deviation = 0.72). This age indicates that the stratigraphic deposition in the Yahe section dates back to the Middle Triassic. The new SHRIMP U-Pb data of the Yahe section volcanic ash provide a strong age constraint for the Triassic stratigraphic division of the Liushan Basin. By comparing the reported ages with similar volcanic ash in the surrounding areas of the Liushan Basin, we infer that these volcanic ash layers may be a sedimentary response to the first phase of the Indosinian Orogeny and can serve as marker layers for regional stratigraphic correlation.
[0083] Student Model Outputs: 1. The research object is a typical geological body. Volcanic ash: a product of volcanic activity, belonging to the research scope of petrology and volcanology; Stratigraphic profile: a systematic study of the "Yahe section of the Liushan Basin," which is the foundation of stratigraphy; Zircon: a mineralogy research object, used for geochronology. 2. The core research method is geochronology. SHRIMPU-Pb dating: this is the standard isotopic dating method in geology for determining the age of igneous and metamorphic rocks; the dating result of 237 ± 2.5 million years directly establishes the time frame of the stratigraphy, which is a core task of geochronology. 3. The research objectives directly address core geological issues. Stratigraphic division and correlation: classifying the Yahe section into the Middle Triassic and correlating it with surrounding areas is a typical work of regional stratigraphy; Tectonic response: linking volcanic ash with the first phase of the Indosinian Movement, belonging to the scope of structural geology and geotectonics; Marker bed establishment: proposing that volcanic ash can be used as a marker bed for regional stratigraphic correlation, which is an important application of establishing isochronous surfaces in stratigraphy. The predicted discipline identifiers are as follows: {First-level discipline identifier: Earth Sciences; Second-level discipline: Geology; Third-level discipline: Stratigraphy and Historical Geology}.
[0084] Furthermore, the aforementioned student inference model can be a relatively small-parameter inference model such as DeepSeek. During supervised fine-tuning, methods such as FlashAttention or Unsloth can be used to accelerate the process; distributed training methods such as NativeDDP or DeepSpeed can be used for distributed training in single-machine multi-GPU or multi-machine multi-GPU environments.
[0085] Based on this, a loss function is constructed using the predicted subject identifier, the target subject identifier, and distillation data. The parameters of the student model are adjusted with the goal of minimizing the loss function to obtain the document classification model. Furthermore, a low-rank LORA adaptation strategy can be used to fine-tune the parameters of the student model. The model adapter generated from this fine-tuning is then merged with the student model to obtain the aforementioned document classification model. Of course, the student model can also be trained on a full dataset; this embodiment does not impose any particular limitation on this approach.
[0086] In summary, this embodiment utilizes a teacher model with strong reasoning capabilities to distill the reasoning process for subject classification, and performs supervised fine-tuning on a student model with a small parameter scale, significantly improving the accuracy and generalization ability of the document classification model in subject classification tasks. The document classification model possesses good scalability and low-cost training and deployment characteristics, making it suitable for various application scenarios such as scientific literature management, large-scale model training corpus classification in scientific fields, and domain knowledge graph construction.
[0087] The following explains the process of determining the subject identifier of documents to be classified using a document classification model.
[0088] As an optional implementation, the documents to be classified are input into a document classification model to determine the subject identifier of the documents to be classified, including: Based on a pre-built first prompt word template, a standard subject classification system, and documents to be classified, first prompt words are generated; and based on the first prompt words, an initial subject identifier is determined for the documents to be classified using a document classification model. Based on a pre-built second prompt word template, documents to be classified, and initial subject identifiers, second prompt words are generated; and based on the second prompt words, a document classification model is used to determine the reflective reasoning result corresponding to the initial subject identifier; the reflective reasoning result includes a first result indicating that the initial subject identifier meets the specified conditions, and a second result indicating that the initial subject identifier does not meet the specified conditions; If the result of the reflective reasoning is the first result, then the initial subject identifier will be used as the subject identifier of the document to be classified. If the result of the reflective reasoning is the second result, then a third prompt word is generated based on the pre-constructed third prompt word template and the unmet conditions to be improved in the specified conditions; based on the third prompt word, the subject identifier that meets the conditions to be improved is determined through the document classification model, and the subject identifier of the document to be classified is obtained.
[0089] Specifically, the process begins by generating a first prompt term based on a pre-built first prompt term template, a standard subject classification system, and the documents to be classified. This first prompt term guides the document classification model to determine the initial subject identifier for the documents from the standard subject identifiers within the standard subject classification system.
[0090] For example, the first prompt template is: You are a subject classification expert in scientific literature. Given a complete standard subject classification system containing first-level, second-level, and third-level disciplines, you are skilled at accurately identifying which first-level, second-level, and third-level disciplines a document belongs to based on its title and abstract, and returning a multi-level subject list (i.e., the initial subject identifier) in JSON format. The standard subject classification system is [%s], the document title is [%s], and the document abstract is [%s].
[0091] Based on this, a second prompt word is generated using a pre-built second prompt word template, the documents to be classified, and the initial subject identifier. The second prompt word is used to guide the document classification model to reflect on the initial subject identifier, determine whether the initial subject identifier meets the specified conditions, and generate a reflective reasoning result.
[0092] The specified conditions mentioned above include, but are not limited to, the initial subject identifier being included within the standard subject classification system to ensure that the initial subject identifier is not a forged subject; the initial subject identifier being associated with the content of the document title and abstract; the initial subject identifier having no missing subject identifiers; and the returned format of the initial subject identifier meeting the requirements. These specified conditions can be set according to actual needs, and will not be elaborated upon in this embodiment.
[0093] If the result of the reflective reasoning is the first result, the initial subject identifier will be used as the subject identifier of the document to be classified.
[0094] If the reflective reasoning result is the second result, a third prompt word is generated based on the pre-constructed third prompt word template and the unmet conditions for improvement in the specified conditions. The third prompt word is used to guide the document classification model to optimize the initial subject identifier, thereby obtaining a subject identifier that meets the conditions for improvement, that is, obtaining the subject identifier of the document to be classified. This embodiment does not impose any special limitations on the above-mentioned third prompt word template.
[0095] In summary, this embodiment employs a multi-stage prompt word optimization strategy and uses a document classification model to determine the subject identifier of the documents to be classified, thereby improving the accuracy of document classification.
[0096] Please refer to Figure 4 , Figure 4 A schematic diagram of a document classification device provided in this application, the device comprising: Standard system construction module 401 is used to construct a standard subject classification system, wherein the standard subject classification system includes at least a standard subject identifier that uniquely corresponds to the subject. The target document extraction module 402 is used to extract target documents that meet preset conditions from the documents. The preset conditions are that at least one of the original subject identifiers marked in advance for the documents is consistent with the standard subject identifier. The target identifier determination module 403 is used to process the original subject identifier of the target document based on the standard subject identifier to obtain the target subject identifier of the target document under the standard subject classification system. Training data pair construction module 404 is used to construct training data pairs by associating target documents with target subject identifiers; The model training module 405 is used to iteratively train a specified large model using training data pairs until the training termination condition is met and a document classification model is obtained. The classification module 406 is used to input the documents to be classified into the document classification model and determine the subject identifier of the documents to be classified.
[0097] For a detailed description of the document classification device provided in this application, please refer to the embodiments of the document classification method described above; this application will not repeat the details here.
[0098] Based on the above embodiments: As an optional embodiment, the target identifier determination module 403 includes: The set construction module is used to assemble the original subject identifiers of the target documents into a set of original subject identifiers; The first identifier selection module is used to select any one of the original subject identifiers from the original subject identifier set as the current subject identifier; The first judgment module is used to determine whether there is an identifier in the standard subject identifiers that is consistent with the current subject identifier; if it exists, the first identifier determination module is triggered; if it does not exist, the identifier removal module is triggered. The first identifier determination module is used to select the current subject identifier as one of the target subject identifiers; The identifier removal module is used to remove the current subject identifier; The second identifier selection module is used to select any unselected original subject identifier from the original subject identifier set as the current subject identifier; and trigger the first judgment module until all original subject identifiers are selected.
[0099] As an optional embodiment, disciplines are pre-divided into different discipline levels; the standard discipline classification system also includes parent discipline identifiers; correspondingly, the device also includes: The first sub-level identifier determination module is used to use the current subject identifier as the current sub-level subject identifier after using the current subject identifier as the target subject identifier; The parent identifier extraction module is used to extract the current parent discipline identifier of the current child discipline identifier from the standard subject classification system; and to use the current parent discipline identifier as one of the target discipline identifiers; The second judgment module is used to determine whether the subject level corresponding to the current parent subject identifier is the highest subject level; the highest subject level is the level that does not have a parent subject; if yes, the second identifier selection module is triggered; if no, the second child identifier determination module is triggered. The second child-level identifier determination module is used to use the current parent-level subject identifier as the current child-level subject identifier and trigger the parent-level identifier extraction module.
[0100] As an optional embodiment, the device further includes: The target subject level determination module is used to determine the target subject level corresponding to the target subject identifier after the target subject identifier is determined. The hierarchical storage module is used to store target subject identifiers into a target identifier list corresponding to the target subject level; there is a one-to-one correspondence between the target subject level and the target identifier list. The deduplication module is used to identify the same target subject identifiers in each target identifier list, and to deduplicate the same target subject identifiers to obtain the final target identifier list; Correspondingly, the training data pair construction module 404 is used to construct training data pairs by combining the target documents with a list of target identifiers.
[0101] As an optional embodiment, the standard system construction module 401 includes: The file acquisition module is used to acquire subject classification and code files; the subject classification and code files include first-level subject identifiers corresponding to first-level subjects, second-level subject identifiers corresponding to second-level subjects, and third-level subject identifiers corresponding to third-level subjects; the subject identifiers include the subject name and the subject code; The fuzzy identifier deletion module is used to identify identifiers containing preset keywords in the three-level subject identifiers as fuzzy subject identifiers; and to delete fuzzy subject identifiers in the subject classification and code files to obtain the initial subject classification system. The label translation module is used to translate the subject names in the initial subject classification system and add the translated subject names to the corresponding subject labels to obtain the standard subject classification system.
[0102] As an optional embodiment, the model training module 405 includes: The distillation module is used to input training data pairs into a pre-trained teacher model to obtain distilled data generated by the teacher model; the distilled data is the reasoning chain data that determines the target subject identifier corresponding to the target document; The prediction module is used to input the standard subject classification system and target documents into the student model, and obtain the predicted subject identifiers determined by the student model for the target documents from the standard subject classification system. The loss function construction module is used to construct a loss function based on the predicted subject identifier, the target subject identifier, and the distillation data. The training module is used to adjust the parameters of the student model with the goal of minimizing the loss function, so as to obtain the document classification model.
[0103] As an optional embodiment, the classification module 406 includes: The first classification module is used to generate first prompt words based on a pre-built first prompt word template, a standard subject classification system, and documents to be classified; and based on the first prompt words, to determine the initial subject identifier for the documents to be classified through a document classification model. The second classification module is used to generate second prompt words based on a pre-built second prompt word template, the documents to be classified, and the initial subject identifier; and based on the second prompt words, it determines the reflective reasoning result corresponding to the initial subject identifier through a document classification model; the reflective reasoning result includes a first result indicating that the initial subject identifier meets the specified conditions, and a second result indicating that the initial subject identifier does not meet the specified conditions; if the reflective reasoning result is the first result, the third classification module is triggered; if the reflective reasoning result is the second result, the fourth classification module is triggered. The third classification module is used to use the initial subject identifier as the subject identifier for the documents to be classified. The fourth classification module is used to generate third prompt words based on a pre-built third prompt word template and the unmet conditions to be improved in the specified conditions; based on the third prompt words, the subject identifiers that meet the conditions to be improved are determined through the document classification model, and the subject identifiers of the documents to be classified are obtained.
[0104] Please refer to Figure 5 , Figure 5 This application provides a schematic diagram of the structure of an electronic device, which includes: Memory 501 is used to store computer programs; Processor 502 is used to implement the steps of any of the above-mentioned document classification methods when executing a computer program.
[0105] For a detailed description of the electronic device provided in this application, please refer to the embodiments of the above-described document classification method; this application will not repeat the details here.
[0106] This application also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned document classification methods.
[0107] The aforementioned storage media include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROMs and DVD-ROMs. Processors and memory may be supplemented by or integrated into dedicated logic circuitry.
[0108] For a detailed description of the storage medium provided in this application, please refer to the embodiments of the above-mentioned document classification method; this application will not repeat them here.
[0109] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.
[0110] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0111] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A document classification method characterized by, The method comprises: constructing a standard discipline classification system, wherein the standard discipline classification system comprises at least a standard discipline identifier corresponding to a discipline uniquely; extracting target literature meeting preset conditions from literature, wherein the preset conditions are at least one identifier consistent with the standard discipline identifier in an original discipline identifier previously labeled for the literature; processing the original discipline identifier of the target literature based on the standard discipline identifier to obtain a target discipline identifier of the target literature under the standard discipline classification system; constructing a training data pair of the target literature and the target discipline identifier; iteratively training a specified large model using the training data pair until a training end condition is reached to obtain a literature classification model; inputting literature to be classified into the literature classification model to determine the discipline identifier of the literature to be classified.
2. The document classification method of claim 1, wherein, The processing of the original discipline identifier of the target literature based on the standard discipline identifier to obtain a target discipline identifier of the target literature under the standard discipline classification system comprises: grouping the original discipline identifier of the target literature into an original discipline identifier set; taking any original discipline identifier in the original discipline identifier set as a current discipline identifier; determining whether there is an identifier consistent with the current discipline identifier in the standard discipline identifier; if there is, taking the current discipline identifier as one of the target discipline identifiers; if there is not, eliminating the current discipline identifier; taking any original discipline identifier not selected in the original discipline identifier set as the current discipline identifier; and returning to the step of determining whether there is an identifier consistent with the current discipline identifier in the standard discipline identifier until all the original discipline identifiers are selected.
3. The document classification method of claim 2, wherein, Each of the disciplines is previously divided into different discipline levels; the standard discipline classification system further comprises a parent discipline identifier of the discipline; Correspondingly, after taking the current discipline identifier as the target discipline identifier, the method further comprises: taking the current discipline identifier as a current child discipline identifier; extracting a current parent discipline identifier of the current child discipline identifier from the standard discipline classification system; and taking the current parent discipline identifier as one of the target discipline identifiers; determining whether the discipline level corresponding to the current parent discipline identifier is a highest discipline level; the highest discipline level is a level without a parent discipline; if yes, entering the step of taking any original discipline identifier not selected in the original discipline identifier set as the current discipline identifier; if no, taking the current parent discipline identifier as the current child discipline identifier, and returning to the step of extracting the current parent discipline identifier of the current child discipline identifier from the standard discipline classification system.
4. The document classification method of claim 3, wherein, After determining the target discipline identifier, the method further comprises: determining a target discipline level corresponding to the target discipline identifier; storing the target discipline identifier into a target identifier list corresponding to the target discipline level; the target discipline level and the target identifier list correspond to each other one by one. For each of the target identification list, the same target subject identification in the target identification list is identified, and the same target subject identification is de-duplicated to obtain a final target identification list; Correspondingly, the target literature and the target subject identification constitute a training data pair, which includes: The target literature and each of the target identification list constitute the training data pair.
5. The document classification method of claim 1, wherein, The standard subject classification system includes: Obtain a subject classification and code file; the subject classification and code file includes a first subject identification corresponding to a first subject, a second subject identification corresponding to a second subject, and a third subject identification corresponding to a third subject; the subject identification includes a subject name and a subject code; The identification with the preset keyword in the third subject identification is taken as a fuzzy subject identification; and the fuzzy subject identification in the subject classification and code file is deleted to obtain an initial subject classification system; The subject name in the initial subject classification system is translated, and the translated subject name is added to the corresponding subject identification to obtain the standard subject classification system.
6. The document classification method of claim 1, wherein, The training data pair is input into a pre-trained teacher model to obtain distillation data generated by the teacher model; the distillation data is inference thinking chain data for determining the target subject identification corresponding to the target literature; The standard subject classification system and the target literature are input into a student model to obtain a predicted subject identification determined by the student model for the target literature from the standard subject classification system; Based on the predicted subject identification, the target subject identification, and the distillation data, a loss function is constructed; The parameters of the student model are adjusted to minimize the loss function to obtain the literature classification model. The literature classification model is input into the literature classification model to determine the subject identification of the literature to be classified, which includes:
7. The document classification method of claim 1, wherein, Based on the first prompt word template, the standard subject classification system, and the literature to be classified, a first prompt word is generated; and based on the first prompt word, the initial subject identification of the literature to be classified is determined by the literature classification model; Based on the second prompt word template, the literature to be classified, and the initial subject identification, a second prompt word is generated; and based on the second prompt word, the reflection reasoning result corresponding to the initial subject identification is determined by the literature classification model; the reflection reasoning result includes a first result representing that the initial subject identification meets a specified condition, and a second result representing that the initial subject identification does not meet the specified condition; If the reflection reasoning result is the first result, the initial subject identification is taken as the subject identification of the literature to be classified; If the reflection reasoning result is the second result, a third prompt word is generated based on a third pre-constructed prompt word template and an unmet to-be-improved condition in the specified condition; and based on the third prompt word, a subject identifier that meets the to-be-improved condition is determined by the literature classification model, to obtain the subject identifier of the to-be-classified literature.
8. A document classification apparatus characterized by comprising: The apparatus comprises: a standard system construction module configured to construct a standard subject classification system, wherein the standard subject classification system comprises at least a standard subject identifier uniquely corresponding to a subject; a target literature extraction module configured to extract target literature meeting a preset condition from literature, wherein the preset condition is that at least one of original subject identifiers pre-labeled for the literature is consistent with the standard subject identifier; a target identifier determination module configured to process the original subject identifier of the target literature based on the standard subject identifier to obtain a target subject identifier of the target literature under the standard subject classification system; a training data pair construction module configured to construct a training data pair by using the target literature and the target subject identifier; a model training module configured to iteratively train a specified large model by using the training data pair until a training end condition is met to obtain a literature classification model; a classification module configured to input to-be-classified literature into the literature classification model to determine a subject identifier of the to-be-classified literature.
9. An electronic device, comprising: comprise: a memory configured to store a computer program; a processor configured to implement steps of the literature classification method according to any one of claims 1 to 7 when the computer program is executed.
10. A storage medium, characterized by The storage medium has a computer program stored thereon, and the computer program is executed by the processor to implement steps of the literature classification method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Chinese academic knowledge graph construction method based on multidisciplinary classification
CN115905554A
Subject classification model construction method and system, electronic equipment and storage medium
CN121256032A
Method and apparatus for training text classification model, and medium and electronic device
WO2025130342A1
Cited By
Iterative optimization method and system for cold start scene subject classification model
CN122020188A