A document 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.

CN121833962BActive Publication Date: 2026-05-12ZHEJIANG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG LAB
Filing Date
2026-03-12
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

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 classification accuracy.

Method used

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 through iterative training.

Benefits of technology

It improves the accuracy and efficiency of document classification, ensuring consistency in subject identification and model classification performance for documents from different sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833962B_ABST
    Figure CN121833962B_ABST
Patent Text Reader

Abstract

The application provides a literature classification method and device, electronic equipment and storage medium, and relates to the technical field of computers. A standard subject classification system is constructed, which at least includes a standard subject identifier uniquely corresponding to a subject. A target literature satisfying a preset condition is extracted; the preset condition is that at least one identifier consistent with the standard subject identifier exists in the original subject identifier pre-labeled for the literature. The original subject identifier is processed based on the standard subject identifier to obtain a target subject identifier of the target literature under the standard subject classification system. The standard subject classification system is used as a unified standard for literature classification, and the subject identifiers of literatures from different sources are standardized, so that the target literature and the target subject identifier form a high-quality training data pair. A specified large model is trained using the training data pair to obtain a literature classification model, thereby improving the classification performance of the model. The subject identifier of the literature to be classified is determined using the literature classification model, thereby ensuring the accuracy of the literature classification.
Need to check novelty before this filing date? Find Prior Art

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:

[0006] 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;

[0007] 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;

[0008] 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;

[0009] The target documents and the target subject identifiers are used to form training data pairs;

[0010] 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.

[0011] The documents to be classified are input into the document classification model to determine the subject identifier of the documents to be classified.

[0012] 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:

[0013] The original subject identifiers of the target documents are combined into a set of original subject identifiers;

[0014] Use any one of the original subject identifiers from the original subject identifier set as the current subject identifier;

[0015] Determine whether there exists an identifier in the standard subject identifiers that is consistent with the current subject identifier;

[0016] If it exists, then the current subject identifier will be used as one of the target subject identifiers;

[0017] If it does not exist, the current subject identifier will be removed;

[0018] 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.

[0019] 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;

[0020] Correspondingly, after using the current subject identifier as the target subject identifier, the method further includes:

[0021] Use the current subject identifier as the current sub-level subject identifier;

[0022] 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;

[0023] 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.

[0024] If so, proceed to the step of using any unselected original subject identifier from the original subject identifier set as the current subject identifier;

[0025] 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.

[0026] Optionally, after determining the target subject identifier, the method further includes:

[0027] Determine the target subject level corresponding to the target subject identifier;

[0028] 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.

[0029] 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;

[0030] Correspondingly, the target documents and the target subject identifier are used to form training data pairs, including:

[0031] The target documents and the list of target identifiers are used to form the training data pairs.

[0032] Optionally, the construction of the standard subject classification system includes:

[0033] 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;

[0034] 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.

[0035] 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.

[0036] 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:

[0037] 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.

[0038] 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.

[0039] A loss function is constructed based on the predicted subject identifier, the target subject identifier, and the distillation data;

[0040] With the goal of minimizing the loss function, the parameters of the student model are adjusted to obtain the document classification model.

[0041] 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:

[0042] 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.

[0043] 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;

[0044] 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;

[0045] 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.

[0046] This application also provides a document classification device, the device comprising:

[0047] 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.

[0048] 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.

[0049] 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.

[0050] The training data pair construction module is used to construct training data pairs by pairing the target documents with the target subject identifiers;

[0051] 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.

[0052] 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.

[0053] This application also provides an electronic device, including:

[0054] Memory, used to store computer programs;

[0055] A processor for executing the computer program to implement any of the above-described document classification methods.

[0056] 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.

[0057] 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

[0058] Figure 1 A first flowchart illustrating a document classification method provided in this application;

[0059] Figure 2 A second flowchart illustrating a document classification method provided in this application;

[0060] Figure 3 A schematic diagram of the third process of a document classification method provided in this application;

[0061] Figure 4 A schematic diagram of a document classification device provided in this application;

[0062] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation

[0063] 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.

[0064] 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."

[0065] Please refer to Figure 1 , Figure 1 A first flowchart illustrating a document classification method provided in this application, the method comprising:

[0066] S101. Construct a standard subject classification system, which shall include at least a standard subject identifier that uniquely corresponds to each subject.

[0067] 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.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] 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.

[0072] 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.

[0073] Finally, the following is an example of target document A and its original subject label extracted from the scientific literature website:

[0074] {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;}

[0075] 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.

[0076] Link to the document details page: https: / / link.springer.com / article / 10.1007 / s12517-013-1157-1;

[0077] Original subject labels: ["Archaeology", "Earth Science", "Geology", "Historical Geology", "Prehistoric Archaeology" and "Structuration"]}.

[0078] 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.

[0079] 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.

[0080] 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.

[0081] S104. Combine the target literature with the target subject identifier to form training data pairs.

[0082] 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.

[0083] 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.

[0084] 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.

[0085] The training process for a specified large model will be described in subsequent implementation examples, and will not be repeated here.

[0086] S106. Input the documents to be classified into the document classification model and determine the subject identifier of the documents to be classified.

[0087] 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.

[0088] 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.

[0089] Based on the above embodiments:

[0090] As an optional implementation, a standard subject classification system is constructed, including:

[0091] 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;

[0092] 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.

[0093] 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.

[0094] 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.

[0095] 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.

[0096] 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.

[0097] 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.

[0098] 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".

[0099] The three-level discipline identifiers within the discipline names that contain the above preset keywords are used as fuzzy discipline identifiers. For example, "Other disciplines of Atmospheric Sciences" and "Other disciplines of Partial Differential Equations" both belong to fuzzy discipline identifiers. Fuzzy discipline identifiers can only be attributed to the corresponding secondary disciplines, and it is impossible to find target documents marked with fuzzy discipline identifiers on authoritative scientific and technological literature websites. Therefore, the fuzzy discipline identifiers need to be deleted, and the initial discipline classification system is obtained thus far.

[0100] Furthermore, in this embodiment, the discipline names in the initial discipline classification system are also translated, and the translated discipline names are added to the corresponding discipline identifiers to obtain a standard discipline classification system, expanding the scope of application of the standard discipline classification system. This embodiment does not limit the language used for translation, and it can be set according to actual needs.

[0101] As an optional embodiment, a dual-track translation strategy is adopted to translate the discipline names in the initial discipline classification system. Specifically, first, the corresponding translations of the discipline names are searched from a professional term library (such as "English-Chinese Dictionary of Science and Technology"); for discipline names that cannot be found in the professional term library (such as emerging disciplines), the large language model is used to translate the discipline names, and manual verification is carried out by domain experts to obtain the translated discipline names.

[0102] In addition, the standard discipline identifiers in the standard discipline classification system can also be divided into different standard identifier lists according to the discipline levels. As an optional embodiment, the standard discipline identifiers of the first-level disciplines are divided into the first-level standard identifier list, the standard discipline identifiers of the second-level disciplines are divided into the second-level standard identifier list, and the standard discipline identifiers of the third-level disciplines are divided into the third-level standard identifier list, obtaining a standard discipline classification system A1 with the following structure:

[0103] {First-level disciplines: [{Code: 170, Chinese: Earth Sciences, English: Earth Science};...];

[0104] Second-level disciplines: [{Code: 17015, Chinese: Atmospheric Sciences, English: Atmospheric Science};...];

[0105] Third-level disciplines: [{Code: A0111, Chinese: Atmospheric Physics, English: Atmospheric Physics};...]}

[0106] The process of determining the target discipline identifier of the target document will be described below.

[0107] Please refer to Figure 2 , Figure 2 which is the second process schematic diagram of a document classification method provided by this application.

[0108] As an optional implementation, based on standard subject identifiers, 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:

[0109] S201. Assemble the original subject identifiers of the target documents into a set of original subject identifiers;

[0110] S202. Take any one of the original subject identifiers from the original subject identifier set as the current subject identifier;

[0111] S203. Determine whether there is an identifier in the standard subject identifier that is consistent with the current subject identifier; if so, proceed to S204; if not, proceed to S205.

[0112] S204. Use the current subject identifier as one of the target subject identifiers;

[0113] S205. Remove the current subject identifier;

[0114] S206. 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 consistent with the current subject identifier in the standard subject identifier set, until all original subject identifiers are selected.

[0115] Considering that scientific literature websites usually mark multiple original subject identifiers for literature, this embodiment will form an original subject identifier set, so that each identifier in the set can be used as the current subject identifier, and the current subject identifier can be compared with each standard subject identifier.

[0116] If there is an identifier in the standard subject identifier that is consistent with the current subject identifier, then the current subject identifier is retained, that is, the current subject identifier is used as one of the target subject identifiers of the target document; if there is no identifier in the standard subject identifier that is consistent with the current subject identifier, then the current subject identifier is removed, that is, the current subject identifier is considered not to conform to the standard subject classification system.

[0117] Repeat the above steps until all original subject identifiers have been selected and the above comparison has been completed, and the target subject identifier of the target document is obtained.

[0118] In summary, in this embodiment, the original subject identifiers that overlap with the standard subject identifiers are retained, and the original subject identifiers that do not overlap with the standard subject identifiers are removed to obtain the target subject identifier of the target document.

[0119] As an optional implementation, disciplines are pre-divided into different discipline levels; the standard discipline classification system also includes parent discipline identifiers for disciplines;

[0120] Correspondingly, after using the current subject identifier as the target subject identifier, the following steps are further included:

[0121] Use the current subject identifier as the current sub - subject identifier;

[0122] 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;

[0123] 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;

[0124] If so, enter the step of using any unselected original subject identifier in the original subject identifier set as the current subject identifier;

[0125] 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.

[0126] 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.

[0127] 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:

[0128] {First - level subjects: [{Code: 170, Chinese: Earth Science, English: Earth Science};...];

[0129] Second - level subjects: [{Code: 17015, Chinese: Atmospheric Science, English: Atmospheric Science}, Parent - subject identifier: 170};...];

[0130] Third - level subjects: [{Code: A0111, Chinese: Atmospheric Physics, English: Atmospheric Physics, Parent - subject identifier: 17015};...]}

[0131] It can be understood that the parent - subject identifier of the second - level subject Atmospheric Science is 170, indicating that Atmospheric Science belongs to the first - level subject Earth Science 170; the parent - subject identifier of the third - level subject Atmospheric Physics is 17015, indicating that Atmospheric Physics belongs to the second - level subject Atmospheric Science 17015.

[0132] Based on this, this embodiment also utilizes parent subject identifiers to supplement the target subject identifiers of the target document. Specifically, after determining that there is an identifier in the standard subject identifiers that is consistent with the current subject identifier, the current subject identifier is further used as the current child-level subject identifier; the current parent subject identifier of the current child-level subject identifier is extracted from the standard subject classification system; and the current parent subject identifier is used as one of the target subject identifiers to supplement the target subject identifiers of the target document. Then, the current parent subject identifier is used as the new current child-level subject identifier, and its current parent subject identifier is extracted again until the subject level corresponding to the current parent subject identifier is the highest subject level.

[0133] Taking the standard subject classification system based on the "Subject Classification and Codes" as an example, the first-level subject is the highest subject level in the standard subject classification system. The first-level subject is the parent subject of the second-level subject, and the second-level subject is the parent subject of the third-level subject. If the current sub-subject identifier is a third-level subject identifier, then the second-level subject identifier to which the current sub-subject identifier belongs is added as the target subject identifier of the target document; if the current sub-subject identifier is a second-level subject identifier, then the first-level subject identifier to which the current sub-subject identifier belongs is added as the target subject identifier of the target document; and so on, until the current sub-subject identifier is a first-level subject identifier.

[0134] In summary, this embodiment further utilizes the parent subject identifiers of each subject identifier to supplement the target subject identifiers of the target documents, forming a multi-disciplinary level of subject identifiers and improving the quality of training data pairs.

[0135] As an optional embodiment, after determining the target subject identifier, the method further includes:

[0136] Determine the target subject level corresponding to the target subject identifier;

[0137] Store the target subject identifiers in a target identifier list corresponding to the target subject level; each target subject level corresponds one-to-one with the target identifier list.

[0138] 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;

[0139] Correspondingly, the target literature and target subject identifiers are paired to form training data pairs, including:

[0140] The target documents are paired with a list of target identifiers to form training data pairs.

[0141] 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.

[0142] 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.

[0143] 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:

[0144] {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";}

[0145] 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."

[0146] "Link to document details page":

[0147] "https: / / link.springer.com / article / 10.1007 / s12517-013-1157-1";

[0148] “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]}}.

[0149] 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.

[0150] The training process for a specified large model is explained below.

[0151] 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.

[0152] 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:

[0153] 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.

[0154] 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;

[0155] S303. Construct a loss function based on the predicted subject identifier, the target subject identifier, and the distillation data;

[0156] S304. Adjust the parameters of the student model with the goal of minimizing the loss function to obtain the document classification model.

[0157] 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.

[0158] 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.

[0159] 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].

[0160] For example, based on the distillation prompt template above, generate the distillation prompt for target document B:

[0161] {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]}";

[0162] The title of this paper is: "Modeling of Morphological Patterns of River Erosion Thermomelane Plains Based on Remote Sensing Data";

[0163] 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."

[0164] Inputting the above distillation prompts into the teacher model yields the following distillation data:

[0165] {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.}

[0166] 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.

[0167] 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.

[0168] 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.

[0169] 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.

[0170] 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.

[0171] 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.

[0172] 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].

[0173] For example, based on the above prediction prompt template, the prediction prompts for target document C are generated as follows:

[0174] 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.

[0175] 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.

[0176] 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}.

[0177] 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.

[0178] 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.

[0179] 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.

[0180] The following explains the process of determining the subject identifier of documents to be classified using a document classification model.

[0181] 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:

[0182] 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.

[0183] 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;

[0184] 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.

[0185] 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.

[0186] 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.

[0187] 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].

[0188] 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.

[0189] 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.

[0190] 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.

[0191] 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.

[0192] 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.

[0193] Please refer to Figure 4 , Figure 4 A schematic diagram of a document classification device provided in this application, the device comprising:

[0194] 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.

[0195] 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.

[0196] 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.

[0197] Training data pair construction module 404 is used to construct training data pairs by associating target documents with target subject identifiers;

[0198] 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.

[0199] 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.

[0200] 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.

[0201] Based on the above embodiments:

[0202] As an optional embodiment, the target identifier determination module 403 includes:

[0203] The set construction module is used to assemble the original subject identifiers of the target documents into a set of original subject identifiers;

[0204] 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;

[0205] 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.

[0206] The first identifier determination module is used to select the current subject identifier as one of the target subject identifiers;

[0207] The identifier removal module is used to remove the current subject identifier;

[0208] 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.

[0209] 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:

[0210] 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;

[0211] 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;

[0212] 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.

[0213] 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.

[0214] As an optional embodiment, the device further includes:

[0215] 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.

[0216] 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.

[0217] 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;

[0218] 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.

[0219] As an optional embodiment, the standard system construction module 401 includes:

[0220] 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 identifier includes the subject name and subject code;

[0221] 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.

[0222] 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.

[0223] As an optional embodiment, the model training module 405 includes:

[0224] 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;

[0225] 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.

[0226] 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.

[0227] 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.

[0228] As an optional embodiment, the classification module 406 includes:

[0229] 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.

[0230] 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, determine 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.

[0231] The third classification module is used to use the initial subject identifier as the subject identifier for the documents to be classified.

[0232] 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.

[0233] Please refer to Figure 5 , Figure 5 This application provides a schematic diagram of the structure of an electronic device, which includes:

[0234] Memory 501 is used to store computer programs;

[0235] Processor 502 is used to implement the steps of any of the above-mentioned document classification methods when executing a computer program.

[0236] 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 them here.

[0237] 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.

[0238] 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.

[0239] For a detailed description of the storage medium provided in this application, please refer to the embodiments of the above-described document classification method; this application will not repeat them here.

[0240] 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.

[0241] 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.

[0242] 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 in that, The method includes: 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. Input the documents to be classified into the document classification model to determine the subject identifier of the documents to be classified; 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. 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; The step of inputting the documents to be classified into the document classification model and determining the subject identifier of the documents 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.

2. The document classification method as described in claim 1, characterized in that, The process 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.

3. The document classification method as described in claim 2, characterized in that, Each of the aforementioned 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.

4. The document classification method as described in claim 3, characterized in that, After determining the target subject identifier, the process also 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.

5. A document classification device, characterized in that, The device includes: 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. The standard system construction module 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 identifier includes the subject name and 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; The model training module 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. The classification module 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, determine 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.

6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the document classification method as described in any one of claims 1 to 4.

7. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the document classification method as described in any one of claims 1 to 4.