Document processing method and device based on large model, equipment, medium and product
By using a large-model-based document processing method to acquire and evaluate document information, the problem of low efficiency in document quality assessment in document libraries is solved, and efficient and accurate document quality assessment is achieved.
Patent Information
- Application Number
- CN202511464720.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-01-16
AI Technical Summary
In existing technologies, document libraries contain a large number of documents of varying quality. Manual evaluation of document quality is inefficient and subjective, making it impossible to accurately find documents that meet quality requirements.
By using a large model-based approach, we obtain information about the document to be processed, retrieve information about similar documents, and perform similarity assessment based on the large model to determine the document quality assessment result.
It improves the accuracy and efficiency of document quality assessment, provides quality reference for subsequent document processing or retrieval, and solves the problems of low efficiency and subjectivity of manual assessment.
Smart Images

Figure CN121350226A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a document processing method and device based on a large model, equipment, medium and product. BACKGROUND
[0002] With the development of business, the number of documents is also gradually increasing. Usually, documents are stored in the form of files in a document library. Due to the large number of documents in the document library and the uneven quality, when a document needs to be found, it is not possible to accurately find a document that meets the quality requirements or has reference value.
[0003] At present, the quality of the found document is mainly evaluated by manual method. However, the manual method for evaluating the quality of the found document is not only inefficient, but also has certain subjectivity, and cannot accurately evaluate the quality of the found document. SUMMARY
[0004] The present application provides a document processing method and device based on a large model, equipment, medium and product, which realizes quality evaluation of the to-be-processed document and improves the accuracy and efficiency of the document quality evaluation.
[0005] According to an aspect of the present application, a document processing method based on a large model is provided, which comprises:
[0006] Upon receiving a document evaluation request, obtaining to-be-processed document information of a to-be-processed document corresponding to the document evaluation request in a target database, wherein the to-be-processed document information comprises: a to-be-processed tree corresponding to the to-be-processed document, to-be-processed keyword information of the to-be-processed document, and to-be-processed feature vectors corresponding to the to-be-processed keyword information, the to-be-processed tree is used to represent the hierarchical structure information of the to-be-processed document, and the to-be-processed tree comprises text information of the to-be-processed document;
[0007] Based on the to-be-processed keyword information and the to-be-processed feature vectors, retrieving similar document information of at least one target similar document corresponding to the to-be-processed document in the target database;
[0008] Based on the large model, performing similarity evaluation processing on the to-be-processed document information and the at least one similar document information to determine a similarity evaluation result;
[0009] Based on the similarity evaluation result, determining a document evaluation result of the to-be-processed document.
[0010] According to another aspect of the present application, a document processing device based on a large model is provided, which comprises:
[0011] The document information obtaining module is configured to obtain, when the document evaluation request is received, document information of a to-be-processed document corresponding to the document evaluation request from a target database, wherein the document information of the to-be-processed document includes a to-be-processed tree corresponding to the to-be-processed document, to-be-processed keyword information of the to-be-processed document, and to-be-processed feature vectors corresponding to the to-be-processed keyword information, the to-be-processed tree is used to represent hierarchical structure information of the to-be-processed document, and the to-be-processed tree includes text information of the to-be-processed document;
[0012] The similar document information obtaining module is configured to obtain, based on the to-be-processed keyword information and the to-be-processed feature vectors, similar document information of at least one target similar document corresponding to the to-be-processed document from the target database;
[0013] The similarity evaluation module is configured to perform similarity evaluation processing on the to-be-processed document information and the at least one similar document information based on the large model, and determine a similarity evaluation result.
[0014] The document evaluation module is configured to determine a document evaluation result of the to-be-processed document based on the similarity evaluation result.
[0015] According to another aspect of the present application, an electronic device is provided, which comprises:
[0016] at least one processor; and
[0017] a memory in communication with the at least one processor; wherein
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the large model-based document processing method of any embodiment of the present application.
[0019] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to execute the large model-based document processing method of any embodiment of the present application when the processor executes the computer instructions.
[0020] According to another aspect of the present application, a computer program product is provided, which comprises a computer program, and the computer program, when executed by a processor, implements the large model-based document processing method of any embodiment of the present application.
[0021] The technical scheme of the embodiment of the present application, when receiving a document evaluation request, obtains the to-be-processed document information of the to-be-processed document corresponding to the document evaluation request in the target database, and based on the to-be-processed keyword information and the to-be-processed feature vector in the to-be-processed document information, retrieves the similar document information of at least one target similar document corresponding to the to-be-processed document from the target database. Based on this, the calling of the similar document information is realized, so as to evaluate the document quality of the to-be-processed document based on the similar document information. The similarity evaluation result is obtained by performing similarity evaluation processing on the to-be-processed document information and at least one similar document information based on the large model. The document evaluation model of the to-be-processed document is determined according to the similarity evaluation result. The present application evaluates the quality of the to-be-processed document by the large model, solves the problems of low efficiency and certain subjectivity caused by manual quality evaluation of the document, improves the accuracy and efficiency of the document quality evaluation, and provides quality reference basis for subsequent document processing or document retrieval.
[0022] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0024] Figure 1 is a flowchart of a document processing method based on a large model provided by an embodiment of the present application;
[0025] Figure 2 is a schematic diagram of a to-be-processed tree provided by an embodiment of the present application;
[0026] Figure 3 is a flowchart of a document processing method based on a large model provided by an embodiment of the present application;
[0027] Figure 4 is an example diagram of a text similarity evaluation process provided by an embodiment of the present application;
[0028] Figure 5 is an example diagram of determining a document evaluation result provided by an embodiment of the present application;
[0029] Figure 6 is a flowchart of a document processing method based on a large model provided by an embodiment of the present application;
[0030] Figure 7 is a format example diagram of a preset document structured template provided by an embodiment of the present application;
[0031] Figure 8 is a structural schematic diagram of a document processing apparatus based on a large model provided by an embodiment of the present application;
[0032] Figure 9 is a structural schematic diagram of an electronic device for implementing a document processing method based on a large model according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present application.
[0034] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] Embodiment one
[0036] Figure 1 is a flowchart of a document processing method based on a large model provided by the first embodiment of the present application. The present embodiment can be applicable to the case of quality evaluation of a document based on a large model. The method can be executed by a document processing apparatus based on a large model, which can be realized in the form of hardware and / or software, and can be configured in an electronic device such as a mobile phone, a computer or a server. As shown in the figure, the method comprises: Figure 1
[0037] S110, upon receiving the document evaluation request, obtaining, in a target database, to-be-processed document information of a to-be-processed document corresponding to the document evaluation request, wherein the to-be-processed document information comprises a to-be-processed tree corresponding to the to-be-processed document, to-be-processed keyword information of the to-be-processed document, and a to-be-processed feature vector corresponding to the to-be-processed keyword information.
[0038] The to-be-processed tree is used to represent the hierarchical structure information of the to-be-processed document, and the to-be-processed tree comprises text information of the to-be-processed document.
[0039] The document evaluation request can be request information for quality evaluation processing of the to-be-processed document. Alternatively, the document evaluation request can be a request message generated by a user based on a trigger operation of a target interface, or a request message issued by a corresponding business system. The to-be-processed document can be a document corresponding to the document evaluation request. The target database can be a database for storing to-be-processed document information of the to-be-processed document. Alternatively, the target database can be a graph database, which can be presented in the form of a knowledge graph.
[0040] It should be noted that the target database comprises document information of a plurality of documents, and after receiving the document evaluation request, a document corresponding to the document evaluation request is determined, which is the to-be-processed document. Correspondingly, the document information of the document in the target database is the to-be-processed document information.
[0041] The to-be-processed tree stores the text information of the to-be-processed document through a tree structure. The root node information of the to-be-processed tree is the document name of the to-be-processed document, and the leaf node information of the to-be-processed tree is the text information of the to-be-processed document. The relationship between the root node and the child node of the to-be-processed tree is used to represent the hierarchical structure information of the to-be-processed document. For example, see Figure 2 , Figure 2 is a schematic diagram of the to-be-processed tree. The root node corresponds to the entire to-be-processed document, for example, the root node information is "XX requirement design document". It should be noted that the root node can also record additional information of the to-be-processed document. The lower-level child node associated with the root node corresponds to a specific chapter of the to-be-processed document, for example, the child node information is a specific chapter name included in the "XX requirement design document", for example, the specific chapter name can be "requirement analysis", "overall scheme",..., "non-functional requirements". The further lower-level child node associated with the lower-level child node corresponds to a specific paragraph or sub-chapter in the chapter of the to-be-processed document, and so on. The leaf node of the to-be-processed tree corresponds to the text information of the to-be-processed document.
[0042] The to-be-processed keyword information can be a set of words or phrases that can highly summarize and accurately reflect the core content, theme or important information of the to-be-processed document. The to-be-processed feature vector can be a feature vector obtained by vectorizing the to-be-processed keyword information.
[0043] Specifically, upon receiving the text evaluation request, the text evaluation request is parsed and processed to determine the to-be-processed document corresponding to the text evaluation request. The to-be-processed document information of the to-be-processed document is retrieved from the target database to obtain the to-be-processed tree corresponding to the to-be-processed document, the to-be-processed keyword information of the to-be-processed document, and the to-be-processed feature vector corresponding to the to-be-processed keyword information, so as to provide data support for subsequent document quality evaluation of the to-be-processed document based on the to-be-processed keyword information, the to-be-processed feature vector and the to-be-processed tree.
[0044] In S120, based on the to-be-processed keyword information and the to-be-processed feature vector, the similarity document information of at least one target similar document corresponding to the to-be-processed document is retrieved from the target database.
[0045] The target similar document can be a document having a certain similarity with the to-be-processed document. The similarity document information can include a similar tree corresponding to the target similar document, similar document keyword information and a similar document feature vector corresponding to the similar document keyword information.
[0046] Specifically, based on the to-be-processed keyword information, an inverted index search or a full-text index search is performed in the target database to determine at least one first similar document corresponding to the to-be-processed document. According to the to-be-processed feature vector, a vector index search is performed in the target database to determine at least one second similar document corresponding to the to-be-processed document. At least one target similar document is determined according to the at least one first similar document and the at least one second similar document. For the at least one target similar document, the similarity document information corresponding to each target similar document is retrieved from the target database.
[0047] In the embodiment of the present application, the manner of retrieving the similarity document information according to the to-be-processed keyword information and the to-be-processed feature vector can be: based on the to-be-processed feature vector, at least one first similar document satisfying a first preset condition of vector similarity between the to-be-processed feature vector is determined in the target database; based on the to-be-processed keyword information, at least one second similar document satisfying a second preset condition of information similarity with the to-be-processed keyword information is determined in the target database; the at least one first similar document and the at least one second similar document are merged to determine at least one target similar document and retrieve the similarity document information of the at least one target similar document.
[0048] The vector similarity can be used to represent the similarity between the to-be-processed feature vector and the feature vector of the corresponding document in the target database. The first preset condition can be that the vector similarity is greater than a preset vector similarity threshold. The preset vector similarity threshold can be a standard value of the vector similarity set according to actual needs. That is, if the vector similarity between the feature vector corresponding to a document in the target database and the to-be-processed feature vector is greater than the preset vector similarity threshold, it is determined that the vector similarity satisfies the first preset condition, and correspondingly, the document is the first similar document. It can be understood that the first similar document can be a document in the target database whose vector similarity is greater than the preset vector similarity threshold.
[0049] The information similarity can be used to represent the similarity between the to-be-processed keyword information and the keyword information of the corresponding document in the target database. The second preset condition can be that the information similarity is greater than a preset information similarity threshold. The preset information similarity threshold can be a standard value of the information similarity set according to actual needs. That is, if the information similarity between the keyword information corresponding to a document in the target database and the to-be-processed keyword information is greater than the preset information similarity threshold, it is determined that the information similarity satisfies the second preset condition. Correspondingly, the document is the second similar document. It can be understood that the second similar document can be a document in the target database whose information similarity is greater than the preset information similarity threshold.
[0050] Specifically, for the to-be-processed feature vector in the to-be-processed document information, vector indexing is performed on the target database to determine at least one first similar document whose vector similarity with the to-be-processed feature vector is greater than a preset vector similarity threshold, that is, at least one first similar document satisfying the first preset condition is obtained. For the to-be-processed keyword information, full-text indexing or inverted indexing is performed on the target database to determine at least one second similar document whose information similarity with the to-be-processed keyword information is greater than a preset information similarity threshold.
[0051] The same document in the at least one first similar document and the at least one second similar document is determined. The same document in the at least one first similar document is removed, and the same document in the at least one second similar document is removed, and the same document, all the remaining first similar documents and all the remaining second similar documents are taken as at least one target similar document. That is, there is no repeated same document in the obtained at least one target similar document. The similar document information corresponding to each target similar document is retrieved from the target database.
[0052] For example, in combination with the above example, see Figure 3 , Figure 3This is a flowchart illustrating a document processing method based on a large model. Taking the document to be processed as "XX Requirements Design Document" as an example, the keyword information to be processed can be the key information T corresponding to the original requirements in the requirements analysis of the XX Requirements Design Document. The feature vector to be processed can be the vector value V corresponding to the key information T.
[0053] Based on the vector value V corresponding to the document to be processed, query the target database for N documents whose vector similarity to vector value V is greater than a preset vector similarity threshold S1; that is, N first-similar documents. Optionally, a list L1 of document numbers corresponding to these N first-similar documents can be determined. The document number is used to uniquely identify the corresponding document in the target database.
[0054] Based on the key information T corresponding to the document to be processed, a full-text index or inverted index is performed in the target database to identify N documents whose information similarity with the key information T is greater than a preset information similarity threshold S2, thus obtaining N second-similar documents. Optionally, a list L2 of document numbers corresponding to the N second-similar documents can be determined.
[0055] Merge document number list L1 and document number list L2, and remove duplicate document numbers to obtain the merged document number list, i.e., Figure 3 The system records a list of similar document IDs to retrieve similar document information for at least one target similar document.
[0056] It should be noted that the number of documents in the first similar document may or may not be the same as the number of documents in the second similar document.
[0057] S130. Based on the large model, perform similarity evaluation on the document information to be processed and at least one similar document information, and determine the similarity evaluation result.
[0058] The large model can be used to evaluate the similarity between the document to be processed and similar documents, and it can also be used to perform quality assessment on the document to be processed. The similarity evaluation result is used to characterize the degree of similarity between the document to be processed and at least one target similar document.
[0059] Specifically, a similarity assessment is performed on the document information to be processed and at least one similar document information based on a large model to determine the similarity assessment result, and then the document assessment result of the document to be processed is determined based on the similarity assessment result.
[0060] In this embodiment of the invention, the method for determining the similarity evaluation result may be as follows: comparing the tree diagram to be processed corresponding to the document information to be processed with the similar tree diagram of at least one similar document information to determine at least one set of similar tree diagram nodes; wherein, each set of similar tree diagram nodes includes: the node to be processed in the tree diagram to be processed and the similar node of at least one similar tree diagram; based on the at least one set of similar tree diagram nodes, determining at least one set of similar text information and standard text information corresponding to each set of similar text information; wherein, each set of similar text information includes: the similar text to be processed corresponding to the document to be processed and the similar text to be used corresponding to at least one target similar document; for at least one set of similar text information, determining the similarity evaluation result corresponding to each set of similar text information according to the standard text information and the similar text to be processed.
[0061] In this context, the similarity tree diagram can be understood as a tree diagram corresponding to similar document information, that is, the tree diagram corresponding to the target similar document. The root node information in the similarity tree diagram is the document name of the target similar document, and the leaf node information is the text information of the target similar document. The similar nodes in the tree diagram can be understood as the similar leaf nodes between the tree diagram to be processed and the similarity tree diagram. The similar nodes in the tree diagram to be processed can be understood as the leaf nodes corresponding to the tree diagram to be processed. The nodes to be processed in the tree diagram to be processed correspond to the corresponding text information in the document to be processed, that is, the similar text to be processed in the document to be processed (mentioned later). The similar nodes in the similarity tree diagram can be understood as the leaf nodes in the similarity tree diagram. The similar nodes correspond to the corresponding text information in the target similar document, that is, the similar text to be used in the target similar document (mentioned later).
[0062] Each set of similar nodes in the tree diagram corresponds to a set of similar text information. The nodes to be processed in the tree diagram included in the similar nodes correspond to the similar text to be processed in the document to be processed. At least one similar node in a similar tree diagram included in the similar nodes corresponds to the similar text to be used in at least one target similar document. Here, the similar text to be processed can be understood as text in the document to be processed that has similar information to at least one target similar document. The similar text to be used can be understood as text in the target similar document that has similar information to the text to be processed.
[0063] Standard text information can be determined based on the similar text to be processed and at least one similar text to be used in each group of similar text information, and can characterize all similar texts in that group. Optionally, standard text information can be standard text summarized and refined based on a large model for each group of similar text information. The similarity evaluation result is used to characterize the degree of similarity between the standard text information and the similar text to be processed.
[0064] Specifically, based on the tree diagram of the document to be processed and the similar tree diagram of each similar document, at least one set of similar nodes in the tree diagram is determined. That is, the node to be processed in the tree diagram is determined, and the similar nodes in each similar tree diagram are determined. For at least one set of similar nodes in the tree diagram, the similar text to be processed corresponding to each node to be processed, and the similar text to be used corresponding to each similar node are determined, so as to determine the similar text information corresponding to each set of similar nodes in the tree diagram.
[0065] For at least one set of similar text information, based on the large model, the unprocessed similar text and at least one unused similar text in each set of similar text information are summarized and refined to obtain the standard text information corresponding to each set of similar text information.
[0066] For each set of similar text information, a similarity evaluation is performed on the similar text to be processed and the corresponding standard text information to determine the similarity evaluation result for each set of similar text information. Optionally, for each set of similar text information, a first vector corresponding to the similar text to be processed and a second vector corresponding to the standard text information can be determined. The cosine similarity between the first vector and the second vector is calculated, and the cosine similarity is used as the similarity evaluation result for each set of similar text information.
[0067] For example, referring to the examples above, see [link to previous section]. Figure 3 , Figure 3 The graph database in the text corresponds to the target database mentioned in the embodiments of the present invention. Based on the aforementioned list of similar documents, at least one target similar document corresponding to the document to be processed is determined, along with similar document information corresponding to each target similar document. See also... Figure 3 and Figure 4 , Figure 4 This is an example diagram illustrating the text similarity assessment process. Figure 4 The document to be scored in the above example corresponds to the document to be processed mentioned above. Figure 4 Based on the tree diagram of the document to be scored and the similarity tree diagram of at least one target similar document in the list of similar documents, a set of similar nodes in the tree diagram, namely the "security requirement" nodes, are determined. It should be noted that the similar nodes in the tree diagram correspond to the leaf nodes of the tree diagram.
[0068] By processing the similar text corresponding to the node "Security Requirement" and the similar text corresponding to at least one similar node "Security Requirement 1", "Security Requirement 2", and "Security Requirement 3" in a large model, the standard answer corresponding to the document to be scored is summarized and extracted. Figure 4 The "security requirements for this type of document" in the document correspond to the standard text information mentioned above.
[0069] The embedding vector corresponding to the similar text to be processed for the node "security requirements" is determined, i.e., the first vector. The embedding vector corresponding to the standard text information is also determined, i.e., the second vector. The cosine similarity between the first and second vectors is calculated, which yields the similarity assessment result corresponding to the similar nodes in the tree diagram. Based on this similarity assessment result, the text quality score of the corresponding similar text to be processed is determined, i.e., the text assessment result mentioned later.
[0070] For example, Figure 3 The processing granularity mentioned above refers to chapters, specifically text information processed at the leaf node level. Figure 3 Taking the example where the similar text to be processed in the document to be processed is the chapter content, and the similar text to be used in the target similar document is the similar chapter content, the model processes the chapter content corresponding to the document to be processed and at least one similar chapter content corresponding to at least one target similar document to determine the standard answer (standard chapter), which is the standard text information mentioned above. The similarity between the standard chapter and the chapter content corresponding to the document to be processed (original chapter) is calculated to determine the similarity evaluation result. Based on the similarity evaluation result, the chapter quality score is obtained, which is the text evaluation result mentioned later.
[0071] S140. Based on the similarity assessment results, determine the document assessment result of the document to be processed.
[0072] The document evaluation results include at least the text evaluation results corresponding to each similar text to be processed and the overall evaluation results corresponding to the document to be processed. The text evaluation results characterize the text quality corresponding to the similar texts to be processed. The overall evaluation results characterize the document quality of the document to be processed.
[0073] It should be noted that the tree diagram to be processed also includes the node weight information corresponding to each node.
[0074] Specifically, based on the similarity assessment results corresponding to at least one similar text in the document to be processed, and according to the preset mapping relationship between the similarity assessment results and the text assessment results, the text assessment result corresponding to each similarity assessment result is determined, that is, the text assessment result corresponding to the leaf node in the tree diagram of the document to be processed. It should be noted that the preset mapping relationship can be understood as the association between the similarity assessment results and the text assessment results. The higher the similarity assessment result, the lower the text assessment result; correspondingly, the lower the similarity assessment result, the higher the text assessment result. If the document to be processed has no target similar documents, then the text assessment result and the corresponding comprehensive assessment result corresponding to the document to be processed are the highest.
[0075] For the tree diagram to be processed, a weighted sum is performed based on the text evaluation results of the similar texts to be processed and the node weight information corresponding to the similar texts in the tree diagram. This summation determines the text evaluation results of the parent nodes associated with the leaf nodes of the similar texts. This process of determining the text evaluation results of parent nodes is repeated until the text evaluation result corresponding to the root node is determined. The text evaluation result corresponding to the root node is then used as the comprehensive evaluation result of the document to be processed. Finally, the document evaluation result is obtained by combining the text evaluation results of each level of nodes in the tree diagram and the comprehensive evaluation result corresponding to the root node.
[0076] Optionally, the document evaluation result can be determined based on the similarity evaluation result as follows: for at least one similar text to be processed corresponding to the document to be processed, determine the text evaluation result corresponding to each similar text to be processed based on the similarity evaluation result corresponding to each group of similar text information; determine the weight information of the node to be processed corresponding to each similar text to be processed based on the position information of each similar text to be processed in the tree diagram to be processed; and determine the document evaluation result of the document to be processed based on the weight information of the node to be processed corresponding to at least one similar text to be processed and the text evaluation result.
[0077] The text evaluation result is inversely proportional to the similarity evaluation result. The position information of the similar text to be processed within the tree diagram is used to identify which leaf node in the tree diagram corresponds to the similar text. The tree diagram also includes node weight information for each node. The node weight information can be understood as the node weight information of the leaf node corresponding to the similar text.
[0078] Specifically, for at least one similar text corresponding to the document to be processed, the text evaluation result corresponding to each similar text is determined based on the similarity evaluation result corresponding to each group of similar text information. The leaf node of the tree diagram corresponding to each similar text is determined, and the weight information of the node to be processed corresponding to that leaf node is also determined. The text evaluation result of the similar text and the weight information of the node to be processed are weighted and summed to determine the text evaluation result of the parent node associated with the corresponding leaf node. This process of determining the text evaluation result of the parent node is repeated until the text evaluation result corresponding to the root node is obtained, and the text evaluation result corresponding to the root node is used as the comprehensive evaluation result of the document to be processed. Finally, the document evaluation result corresponding to the document to be processed is obtained by combining the text evaluation results corresponding to each level of the tree diagram and the comprehensive evaluation result corresponding to the root node.
[0079] For example, see Figure 5 , Figure 5Example diagram to determine the document evaluation results. At least one of the aforementioned similar texts to be processed is... Figure 5 The text information corresponding to the leaf nodes "Requirement Background", "Requirement Description", "Deployment Requirements", and "Security Requirements" is displayed.
[0080] Based on the similarity evaluation results corresponding to each group of similar text information, the text evaluation result corresponding to each piece of similar text to be processed is determined. Based on the leaf node corresponding to the piece of similar text and the corresponding weight information of the node to be processed, the text evaluation result of the parent node associated with the leaf node is determined. For example... Figure 5 In the process, the text evaluation result of the first similar text to be processed is W11=30, the corresponding leaf node is "Requirement Background", and the corresponding weight information of the node to be processed is S11=0.85. The text evaluation result of the second similar text to be processed is W12=50, the corresponding leaf node is "Requirement Description", and the corresponding weight information of the node to be processed is S12=0.85. Based on this, the text evaluation result corresponding to the parent node associated with the above two leaf nodes can be determined as S21=S11*W11+S12*W12. This process of determining the text evaluation result corresponding to the parent node is repeated until the text evaluation result corresponding to the root node is obtained, i.e., the comprehensive evaluation result. The text evaluation result corresponding to each node and the comprehensive evaluation result are used as the document evaluation result of the document to be processed.
[0081] For example, taking the above example and considering similar text to be processed as the chapter content of the document to be processed, and the text evaluation result as the text quality score, we will illustrate the process. First, determine the leaf node in the tree diagram corresponding to each chapter content. Then, perform a weighted summation based on the text quality score corresponding to the chapter content and the weight information of the corresponding leaf node to determine the text quality score of the parent node associated with the leaf node. Optionally, the calculation process of the parent node's text quality score can be represented by the following function.
[0082] ;
[0083] in, Indicates the parent node Text quality score, Indicates the relationship with the parent node The associated first The text quality score corresponding to the child node. Indicates the first The weight information of the child node to be processed. Indicates the relationship with the parent node The number of associated child nodes.
[0084] Repeat the above process until the text quality score of the root node is obtained, which is the overall quality score of the document to be processed. In other words, calculate the weighted sum of the scores of the lower-level nodes as the score of this node. First calculate the score of the i-th level node, then summarize the scores of the (i-1)-th level nodes, and so on, until the score of the first-level document is finally obtained.
[0085] It should be noted that the tree diagram to be processed can be updated based on the text evaluation results corresponding to each node and the comprehensive evaluation results corresponding to the root node. The updated tree diagram to be processed is then stored in the target database. When a document retrieval requirement or other document processing requirement is detected, the comprehensive evaluation result of the document to be processed and the text evaluation results corresponding to each part (node) can be determined from the tree diagram to be processed in the target database. This provides a quality reference for the subsequent use of the document to be processed and also provides reference data for the subsequent automated use of documents.
[0086] The technical solution of this embodiment, upon receiving a document evaluation request, retrieves the document information of the document to be processed corresponding to the document evaluation request from the target database. Based on the keyword information and feature vector of the document to be processed, it retrieves the similar document information of at least one target similar document corresponding to the document to be processed from the target database. Based on this, it realizes the retrieval of similar document information to evaluate the document quality of the document to be processed. A large model is used to perform similarity evaluation on the document information to be processed and at least one similar document, obtaining a similarity evaluation result. The document evaluation model for the document to be processed is determined based on the similarity evaluation result. This invention uses a large model to evaluate the quality of the document to be processed, solving the problems of low efficiency and subjectivity caused by manual document quality evaluation, improving the accuracy and efficiency of document quality evaluation, and providing a quality reference for subsequent document processing or document retrieval.
[0087] Example 2
[0088] Figure 6 This is a flowchart of a document processing method based on a large model provided in Embodiment 2 of the present invention. In this embodiment, prior to the processing in the above embodiments, the document information to be used is determined to achieve structured storage of the document to be used, so that when a document evaluation request is received, the corresponding document information can be retrieved from the target database. Specific implementation details can be found in the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here. Figure 6 As shown, the method includes:
[0089] S210. Obtain the document to be used.
[0090] The document to be used can be a document that needs to be processed and stored in the target database.
[0091] Specifically, the document to be used is obtained, parsed, and the document information corresponding to the document to be used is stored in the target database for subsequent processing.
[0092] S220. Parse and process the document to be used to determine the tree diagram to be used corresponding to the document.
[0093] The tree diagram to be used represents the hierarchical structure information of the document to be used, and includes all the text information of the document. The root node of the tree diagram is the document name of the document to be used, and the leaf nodes are the text information of the document to be used.
[0094] Specifically, the document to be used is parsed and processed to convert it into a tree structure, resulting in a tree diagram corresponding to the document to be used.
[0095] For example, see Figure 3 This involves using Python to parse DOCX format documents, identifying multiple chapters corresponding to the document and multiple sub-chaps (text information) for each chapter. Based on these chapters and sub-chaps, a similar process is generated. Figure 2 The tree diagram shown.
[0096] S230. Retrieve the preset document structure template corresponding to the document category of the document to be used.
[0097] Among them, the preset document structure template is used to represent the standard hierarchical structure information corresponding to the document category.
[0098] In this context, document category can be understood as the document type corresponding to the document to be used. For example, the document to be used could be a requirements analysis document, and the document category could be a requirements analysis class.
[0099] A preset document structure template can be a template containing standard hierarchical structure information corresponding to the document category of the document to be used, set according to actual needs. For example, the format of a preset document structure template can be as follows: Figure 7 As shown. Figure 7In this context, "label" represents the document section's label in the graph database, "type" represents the document element type, such as "Heading1" indicating a first-level heading. "required" indicates whether the corresponding document element type is mandatory. If subsequent matching determines that the document to be used does not contain the mandatory document element type, the match fails, and the document to be used is considered invalid and will not be processed further. "keyword" represents the matching keyword used to match the document to be used. "children" represents the next level of document structure. "weight" represents the node weight information.
[0100] Specifically, the document category of the document to be used is determined, and the preset document structure template corresponding to the document category is retrieved based on the document category.
[0101] S240. Based on the tree diagram to be used, perform matching processing with the preset document structure template to obtain the matching result.
[0102] The matching result can be either a successful match between the tree diagram to be used and the preset document structure template, or a failure to match.
[0103] Specifically, the tree diagram to be used is matched with the preset document structure template to determine whether the document to be used contains the document element types that must exist as defined by the preset document structure template. If they exist, the matching result is considered successful; otherwise, the matching result is considered unsuccessful.
[0104] Optionally, after matching, the tree diagram to be used can be updated based on information in a preset document structure template. That is, the node information of the tree diagram to be used is supplemented based on information in the preset document structure template corresponding to the nodes of the tree diagram to be used.
[0105] Optionally, before matching the tree diagram to be used with the preset document structure template, the method further includes: preprocessing the document to be used to obtain a preprocessed document; wherein the document preprocessing includes at least: document validity verification, document format processing, and document data cleaning; adjusting the tree diagram to be used based on the preprocessed document to obtain an adjusted tree diagram to be used, and then matching the adjusted tree diagram to be used with the preset document structure template.
[0106] Document validity verification can be understood as checking whether the validity period of the document to be used is within a preset validity period to avoid the document being expired. Document format processing can be used to process the document format of the document to be used, converting it to a preset format for easy adjustment into the tree diagram to be used later. Document data cleaning processing can be used to clean the data or text information contained in the document to be used. For example, deleting blank lines or blank pages in the document to be used, and correcting typos in the document to be used. Preprocessed document can be understood as the preprocessed document to be used.
[0107] Specifically, to ensure the accuracy of the generated tree diagrams and improve the reliability of document quality assessment, before matching the tree diagrams with the preset document structure template, the documents to be used can undergo preprocessing, including document validity verification, document formatting, and document data cleaning, to obtain a preprocessed document. The tree diagrams to be used are then adjusted based on the preprocessed document to obtain an adjusted tree diagram. Alternatively, a preprocessed document tree diagram corresponding to the preprocessed document can be identified, and the tree diagrams to be used can be updated based on the preprocessed document tree diagrams to obtain an adjusted tree diagram. Based on this, the adjusted tree diagrams to be used can be matched with the preset document structure template to obtain the matching result.
[0108] S250. If the matching result is successful, determine the keyword information to be used in the document to be used and the feature vector to be used corresponding to the keyword information based on the large model.
[0109] The keywords to be used can be a set of words or phrases that can highly summarize and accurately reflect the core content, theme, or important information of the document to be used. The feature vector to be used can be the feature vector obtained by vectorizing the keyword information to be used.
[0110] Specifically, after confirming a successful match between the tree diagram to be used and the preset document structure template, the keyword information to be used in the document can be determined based on the large model. This keyword information is then converted into a semantically meaningful vector, resulting in the feature vector corresponding to the keyword information.
[0111] For example, referring to the examples above, see [link to previous section]. Figure 3Taking the keyword information to be used as key information in the original requirements of the document to be used as an example, the document to be used is processed based on a large model to determine the key information in the original requirements section of the document. For this key information, the embedding model interface is called to convert the key information into a semantic vector, that is, to obtain the feature vector to be used. The feature vector to be used is stored in the vector index to facilitate the subsequent search for similar documents based on the vector index. The key information is also stored in the full-text index to facilitate the subsequent search for similar documents based on the full-text index or the inverted index.
[0112] Optionally, the method further includes: if the matching result is successful, updating the tree diagram to be used based on the node weight information corresponding to the standard hierarchical structure in the preset document structure template, so as to store the updated tree diagram to be used into the target database.
[0113] Among them, the node weight information is used to characterize the importance of the corresponding node in the tree diagram to be used.
[0114] Specifically, after the tree diagram to be used is successfully matched with the preset document structure template, the nodes in the tree diagram to be used are updated according to the node weight information corresponding to the standard hierarchical structure in the preset document structure template. That is, the node weight information corresponding to each node in the tree diagram to be used is determined to obtain the updated tree diagram to be used, and the updated tree diagram to be used is stored in the target database.
[0115] S260. Store the document to be used tree diagram, keyword information, and feature vector as document information in the target database so that when a document evaluation request is detected, the document information corresponding to the document evaluation request can be retrieved from the target database.
[0116] Specifically, the tree diagram of the document to be used, the keyword information to be used, and the feature vector to be used are used as the document information to be used. The document information to be used is stored in the target database so that when a document evaluation request is detected, the document information corresponding to the document evaluation request can be retrieved from the target database.
[0117] For example, taking the above example and using a graph database as the target database, the documents to be used are stored in the graph database in the form of a tree diagram. Leaf nodes in the tree diagram can use the same label, and a has-a relationship can be established between parent and child nodes. For multiple child nodes at the same level, a position index field is added to the graph database to maintain the integrity of the structural information, ensuring that the tree structure of the tree diagram stored in the graph database is consistent with the tree structure of the tree diagram after parsing the documents. Different labels are assigned to the child nodes corresponding to each chapter, while maintaining the relationships between chapters to facilitate subsequent queries based on the document structure.
[0118] The technical solution of this embodiment obtains the document to be used, parses and processes the document to determine the corresponding tree diagram to be used. A preset document structure template corresponding to the document category of the document to be used is retrieved, and the tree diagram to be used is matched with the preset document structure template to obtain a matching result. If the matching result is successful, the keyword information to be used and the corresponding feature vector to be used for the document to be used are determined based on a large model. The tree diagram to be used, the keyword information to be used, and the feature vector to be used are stored as the document information to be used in the target database, so that when a document evaluation request is detected, the document information corresponding to the document evaluation request can be retrieved from the target database. This embodiment of the invention achieves structured storage of the document to be used, preserving both the content and the structured relationships of the document, facilitating multi-granularity and multi-mode document retrieval, and improving the efficiency and accuracy of subsequent document searches.
[0119] Example 3
[0120] Figure 8 This is a schematic diagram of a document processing device based on a large model provided in Embodiment 3 of the present invention. Figure 8 As shown, the device includes: a document information acquisition module 310, a similar document information acquisition module 320, a similarity evaluation module 330, and a document evaluation module 340.
[0121] The pending document information acquisition module 310 is used to acquire pending document information of the pending document corresponding to the document evaluation request from the target database when a document evaluation request is received. The pending document information includes: a pending tree diagram corresponding to the pending document, pending keyword information of the pending document, and pending feature vectors corresponding to the pending keyword information. The pending tree diagram is used to represent the hierarchical structure information of the pending document and includes the text information of the pending document. The similar document information acquisition module 320 is used to retrieve similar document information of at least one target similar document corresponding to the pending document from the target database based on the pending keyword information and the pending feature vectors. The similarity evaluation module 330 is used to perform similarity evaluation processing on the pending document information and at least one similar document information based on a large model to determine the similarity evaluation result. The document evaluation module 340 is used to determine the document evaluation result of the pending document based on the similarity evaluation result.
[0122] The technical solution of this embodiment, upon receiving a document evaluation request, retrieves the document information of the document to be processed corresponding to the document evaluation request from the target database. Based on the keyword information and feature vector of the document to be processed, it retrieves the similar document information of at least one target similar document corresponding to the document to be processed from the target database. Based on this, it realizes the retrieval of similar document information to evaluate the document quality of the document to be processed. A large model is used to perform similarity evaluation on the document information to be processed and at least one similar document, obtaining a similarity evaluation result. The document evaluation model for the document to be processed is determined based on the similarity evaluation result. This invention uses a large model to evaluate the quality of the document to be processed, solving the problems of low efficiency and subjectivity caused by manual document quality evaluation, improving the accuracy and efficiency of document quality evaluation, and providing a quality reference for subsequent document processing or document retrieval.
[0123] Based on the above embodiments, optionally, the device further includes: a document-to-use information determination module, which includes: a document-to-use acquisition unit, used to acquire the document to be used; a tree diagram-to-use determination unit, used to parse the document to be used and determine the tree diagram to be used corresponding to the document to be used; wherein, the tree diagram to be used is used to represent the hierarchical structure information of the document to be used, the root node information of the tree diagram to be used is the document name of the document to be used, and the leaf node information of the tree diagram to be used is the text information of the document to be used; a structured template retrieval unit, used to retrieve a preset document structured template corresponding to the document category of the document to be used; wherein, the preset document structured template is used for... The system includes: a standard hierarchical structure information corresponding to documents representing document categories; a template matching unit, used to match the tree diagram to be used with a preset document structure template to obtain the matching result; an information determination unit, used to determine the keyword information to be used and the corresponding feature vector to be used for the document to be used based on the large model when the matching result is successful; and a document information storage unit, used to store the tree diagram to be used, the keyword information to be used, and the feature vector to be used for the document to be used into the target database as the document information to be used for the document to be used, so that when a document evaluation request is detected, the document information corresponding to the document evaluation request can be retrieved from the target database.
[0124] Optionally, the document information determination module further includes: a document preprocessing unit, used to preprocess the document to be used to obtain a preprocessed document; wherein, the document preprocessing includes at least: document validity verification processing, document format processing, and document data cleaning processing; and adjusting the tree diagram to be used based on the preprocessed document to obtain an adjusted tree diagram to be used, and matching the adjusted tree diagram to be used with a preset document structure template.
[0125] Optionally, the document information determination module further includes a tree diagram update unit, which, when the matching result is a successful match, updates the tree diagram to be used based on the node weight information corresponding to the standard hierarchical structure in the preset document structure template, so as to store the updated tree diagram to be used into the target database.
[0126] Optionally, the similar document information acquisition module is used to determine, based on the feature vector to be processed, at least one first similar document in the target database whose vector similarity with the feature vector to be processed meets a first preset condition; based on the keyword information to be processed, determine at least one second similar document in the target database whose information similarity with the keyword information to be processed meets a second preset condition; merge the at least one first similar document and the at least one second similar document to determine at least one target similar document and retrieve the similar document information of the at least one target similar document.
[0127] Optionally, a similarity evaluation module is used to compare the tree diagram to be processed corresponding to the document information to be processed with the similar tree diagram of at least one similar document information to determine at least one set of similar nodes in the tree diagram; wherein, each set of similar nodes in the tree diagram includes: the node to be processed in the tree diagram to be processed and the similar node in at least one similar tree diagram; based on the at least one set of similar nodes in the tree diagram, at least one set of similar text information and standard text information corresponding to each set of similar text information are determined; wherein, each set of similar text information includes: the similar text to be processed corresponding to the document to be processed and the similar text to be used corresponding to at least one target similar document; for at least one set of similar text information, the similarity evaluation result corresponding to each set of similar text information is determined according to the standard text information and the similar text to be processed.
[0128] Optionally, a document evaluation module is used to determine the text evaluation result corresponding to each similar text based on the similarity evaluation result corresponding to each group of similar text information for at least one similar text to be processed of the document to be processed; determine the weight information of the node to be processed corresponding to each similar text based on the position information of each similar text to be processed in the tree diagram to be processed; and determine the document evaluation result of the document to be processed based on the weight information of the node to be processed corresponding to at least one similar text to be processed and the text evaluation result.
[0129] The document processing apparatus based on a large model provided in the embodiments of the present invention can execute the document processing method based on a large model provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0130] Example 4
[0131] Figure 9 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0132] like Figure 9As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0133] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0134] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as document processing methods based on large models.
[0135] In some embodiments, the large-model-based document processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the large-model-based document processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the large-model-based document processing method by any other suitable means (e.g., by means of firmware).
[0136] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0137] Computer programs for implementing the large-model-based document processing method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0138] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0139] Example 5
[0140] Embodiment 5 of the present invention also provides a computer-readable storage medium storing computer instructions for causing a processor to execute a document processing method based on a large model, the method comprising:
[0141] Upon receiving a document evaluation request, the system retrieves the document information corresponding to the document evaluation request from the target database. This document information includes: a tree diagram corresponding to the document, keyword information for the document, and a feature vector corresponding to the keyword information. The tree diagram represents the hierarchical structure of the document and includes its text information. Based on the keyword information and feature vector, the system retrieves similar document information from the target database for at least one similar document. A large model is used to perform similarity evaluation on the document information and the at least one similar document to determine the similarity evaluation result. Finally, based on the similarity evaluation result, the system determines the document evaluation result for the document.
[0142] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0143] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0144] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0145] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0146] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0147] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A large model-based document processing method, characterized by, The method comprises the following steps: Upon receiving a document evaluation request, obtaining, in a target database, to-be-processed document information of a to-be-processed document corresponding to the document evaluation request, wherein the to-be-processed document information comprises a to-be-processed tree corresponding to the to-be-processed document, to-be-processed keyword information of the to-be-processed document, and to-be-processed feature vectors corresponding to the to-be-processed keyword information, the to-be-processed tree is used to represent hierarchical structure information of the to-be-processed document, and the to-be-processed tree comprises text information of the to-be-processed document; Based on the to-be-processed keyword information and the to-be-processed feature vectors, retrieving, in a target database, similarity document information of at least one target similar document corresponding to the to-be-processed document; Based on a large model, performing similarity evaluation processing on the to-be-processed document information and at least one similar document information to determine a similarity evaluation result; Based on the similarity evaluation result, determining a document evaluation result of the to-be-processed document.
2. The method of claim 1, wherein, The method further comprises: Obtaining a to-be-used document; Performing parsing processing on the to-be-used document to determine a to-be-used tree corresponding to the to-be-used document; wherein the to-be-used tree is used to represent hierarchical structure information of the to-be-used document, root node information of the to-be-used tree is a document name of the to-be-used document, and leaf node information of the to-be-used tree is text information of the to-be-used document; Retrieving a preset document structured template corresponding to a document category of the to-be-used document; wherein the preset document structured template is used to represent standard hierarchical structure information corresponding to a document of the document category; Based on the to-be-used tree and the preset document structured template, performing matching processing to obtain a matching result; In a case where the matching result is a matching success, determining, based on a large model, to-be-used keyword information of the to-be-used document and to-be-used feature vectors corresponding to the to-be-used keyword information; Storing the to-be-used tree, the to-be-used keyword information, and the to-be-used feature vectors of the to-be-used document as to-be-used document information of the to-be-used document in a target database, so as to retrieve, in the target database, document information corresponding to the document evaluation request when the document evaluation request is detected.
3. The method of claim 2, wherein, Before the matching processing based on the to-be-used tree and the preset document structured template, the method further comprises: Performing document preprocessing on the to-be-used document to obtain a preprocessed document; wherein the document preprocessing at least comprises document validity verification processing, document format processing, and document data cleaning processing; Based on the preprocessed document, performing adjustment processing on the to-be-used tree to obtain an adjusted to-be-used tree, so as to perform matching processing based on the adjusted to-be-used tree and the preset document structured template.
4. The method of claim 2, wherein, The method further comprises: In a case where the matching result is a matching success, performing update processing on the to-be-used tree based on node weight information corresponding to the standard hierarchical structure in the preset document structured template, so as to store the updated to-be-used tree in the target database.
5. The method of claim 1, wherein, The method comprises the following steps: Based on the to-be-processed keyword information and the to-be-processed feature vector, the similarity document information of at least one target similar document corresponding to the to-be-processed document is retrieved from the target database, which comprises the following steps: Based on the to-be-processed feature vector, at least one first similar document satisfying a first preset condition of vector similarity with the to-be-processed feature vector is determined in the target database; Based on the to-be-processed keyword information, at least one second similar document satisfying a second preset condition of information similarity with the to-be-processed keyword information is determined in the target database; 6. The method of claim 1, wherein, The at least one first similar document and the at least one second similar document are processed to determine at least one target similar document and retrieve the similarity document information of the at least one target similar document. The method comprises the following steps: The to-be-processed document information corresponding to the to-be-processed tree diagram and the similarity tree diagram of at least one similar document information are compared to determine at least one group of tree diagram similar nodes; wherein each group of tree diagram similar nodes comprises a to-be-processed node of the to-be-processed tree diagram and a similar node of at least one similarity tree diagram; Based on at least one group of tree diagram similar nodes, at least one group of similar text information and standard text information corresponding to each group of similar text information are determined; wherein each group of similar text information comprises to-be-processed similar text corresponding to the to-be-processed document and to-be-used similar text corresponding to at least one target similar document; 7. The method of claim 6, wherein, For at least one group of similar text information, the similarity evaluation result corresponding to each group of similar text information is determined according to the standard text information and the to-be-processed similar text. Based on the similarity evaluation result, the document evaluation result of the to-be-processed document is determined, which comprises the following steps: For at least one to-be-processed similar text corresponding to the to-be-processed document, the text evaluation result corresponding to each to-be-processed similar text is determined according to the similarity evaluation result corresponding to each group of similar text information; Based on the position information of each to-be-processed similar text in the to-be-processed tree diagram, the to-be-processed node weight information corresponding to each to-be-processed similar text is determined; 8. A large model-based document processing apparatus, characterized by comprising: Based on the to-be-processed node weight information and the text evaluation result corresponding to at least one to-be-processed similar text, the document evaluation result of the to-be-processed document is determined. The method comprises the following steps: The to-be-processed document information acquisition module is used to acquire the to-be-processed document information of the to-be-processed document corresponding to the document evaluation request from the target database when the document evaluation request is received, wherein the to-be-processed document information comprises the to-be-processed tree diagram corresponding to the to-be-processed document, the to-be-processed keyword information of the to-be-processed document, and the to-be-processed feature vector corresponding to the to-be-processed keyword information, the to-be-processed tree diagram is used to represent the hierarchical structure information of the to-be-processed document, and the to-be-processed tree diagram comprises the text information of the to-be-processed document; The similar document information obtaining module is configured to obtain similar document information of at least one target similar document corresponding to the to-be-processed document from a target database based on the to-be-processed keyword information and the to-be-processed feature vector; The similarity evaluation module is configured to perform similarity evaluation processing on the to-be-processed document information and the at least one similar document information based on the large model, and determine a similarity evaluation result. The document evaluation module is configured to determine a document evaluation result of the to-be-processed document based on the similarity evaluation result.
9. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the large model-based document processing method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the large model-based document processing method of any one of claims 1-7 when executed by the processor.
11. A computer program product comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the large model-based document processing method of any one of claims 1-7.