A document processing method, system, device and storage medium
Through the user -defined document split rules and knowledge acquisition strategies, the internal documentation of the enterprise is split and prepared, the problem of low Chinese document management and query efficiency is solved, and efficient knowledge acquisition and document management have been achieved.
Patent Information
- Application Number
- CN202410492884.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-04-23
AI Technical Summary
The existing knowledge base is difficult to efficiently manage and query large and scattered documents within the enterprise, resulting in high document management and maintenance costs and low knowledge acquisition efficiency.
Use user -defined preset documents for disassembly and pre -processing of information documents, and in conjunction with knowledge acquisition strategies for document recalls and information screening to improve the accuracy and efficiency of knowledge acquisition.
Through document splitting and preprocessing, the integrity and original style of knowledge are retained, document readability and management efficiency are improved, information document management and maintenance costs are reduced, and the accuracy and efficiency of knowledge acquisition are improved.
Smart Images

Figure HDA0004805936470000011 
Figure HDA0004805936470000021 
Figure HDA0004805936470000031
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of knowledge base data processing, and in particular to a document processing method, system, device and storage medium. Background Art
[0002] With the development of the Internet, the application of knowledge base based on knowledge acquisition is gradually increasing, and the application of large language models (LLM) is becoming more and more extensive. Taking the common document query in enterprises as an example, as the business of enterprises continues to expand, various data documents will gradually accumulate within the enterprise, and these data are usually scattered in different storage locations. As time goes by, the number of documents will continue to grow, forming a huge data asset; and these large-scale documents are difficult to classify, making document management and maintenance more difficult and the cost of dedicated management and maintenance is high.
[0003] At present, most knowledge bases on the market can only store and manage knowledge. Documents are generally stored in databases, and fuzzy matching or word segmentation search is performed through keyword search. After locating the document, users summarize the knowledge based on their own experience. The efficiency of knowledge acquisition is low, so there is room for improvement. Summary of the invention
[0004] In order to facilitate the management and maintenance of documents and improve the efficiency of knowledge acquisition, the present application provides a document processing method, system, device and storage medium.
[0005] In the first aspect, the invention objective of the present application is achieved by adopting the following technical solutions:
[0006] A document processing method is applied to a local knowledge base, wherein the local knowledge base stores a plurality of information documents, wherein the information documents are preprocessed and split according to a preset document splitting rule to obtain target document paragraphs, and the target document paragraphs are stored in the local knowledge base and associated with corresponding information documents;
[0007] The document processing method comprises:
[0008] Obtaining a knowledge acquisition question input by a user, performing vectorization processing and feature information extraction on the knowledge acquisition question, and obtaining a knowledge acquisition question vector and corresponding vector feature information;
[0009] Recalling relevant documents in the local knowledge base according to the knowledge acquisition question vector and corresponding vector feature information to obtain initial recalled documents matching the knowledge acquisition question;
[0010] The information of the initial recalled document is screened and extracted according to a preset knowledge acquisition strategy to obtain the answer to the knowledge acquisition question and the corresponding target knowledge document.
[0011] By adopting the above-mentioned technical solution, when saving information documents in the local knowledge base, the present application adopts user-defined preset document splitting rules to split the information documents, wherein the document splitting rules may adopt paragraph splitting, image splitting and other document splitting rules; document preprocessing includes preprocessing operations such as splitting tables and images in the information documents. The preset document splitting rules retain the integrity of the knowledge splitting of the information documents, and also retain the original style for documents such as tables and images, thereby improving the document readability of users when acquiring knowledge, which is conducive to improving document processing efficiency and document management efficiency.
[0012] Furthermore, the present application also adopts a document recall method of a knowledge acquisition strategy, by vectorizing user questions to obtain vectorized knowledge acquisition question vectors and corresponding vector feature information, and then in the local knowledge base, based on the knowledge acquisition question vector and the corresponding vector feature information, the knowledge acquisition question vector is retrieved and matched with the documents in the local knowledge base to generate an initial recall document; in order to further improve the accuracy of knowledge recall of the local knowledge base, the initial recall document is screened according to the knowledge acquisition strategy to obtain a definite answer and the corresponding target knowledge document, and then the target knowledge document is filtered to obtain an answer corresponding to the knowledge acquisition question; compared with the knowledge acquisition method of manually summarizing knowledge based on one's own experience, the knowledge acquisition strategy of the present application not only improves the efficiency of knowledge acquisition and reduces the cost of information document management and maintenance, but also improves the accuracy of knowledge acquisition, and further improves the user's experience of using the local knowledge base.
[0013] In a preferred example of the present application: the method further includes:
[0014] Acquire the information document to be processed, pre-process and split the information document according to the preset document splitting rule to obtain the target document paragraph, store the target document paragraph in the local knowledge base, and associate it with the corresponding information document;
[0015] The step of obtaining the information document to be processed, preprocessing and splitting the information document according to a preset document splitting rule to obtain a target document paragraph, and storing the target document paragraph in the local knowledge base and associating the target document with the corresponding information document includes:
[0016] Acquire an information document to be processed, and identify the document length of the information document to be processed;
[0017] When the document length of the information document to be processed meets the preset document segmentation condition, a preset document segmentation rule of the information document to be processed is selected according to the acquired segmentation selection instruction, and the document segmentation rule includes document equidistant segmentation, paragraph segmentation and symbol segmentation;
[0018] The information document to be processed is split according to the selected preset document splitting rule to obtain target document paragraphs; summary information and keyword extraction are performed on the target document paragraphs to obtain corresponding information tags, and according to the mapping relationship between the target document paragraphs and the corresponding information tags, the target document paragraphs are associated with the corresponding information documents; vectorization is performed on the target document paragraphs to obtain vectorized target document paragraphs;
[0019] The vectorized target document paragraph is stored in the local knowledge base.
[0020] By adopting the above-mentioned technical scheme, the present application adopts the method of preprocessing the target knowledge document (i.e., the information document to be processed) and storing it after custom splitting. The document splitting can be performed according to the user's selection and pre-defined document splitting rules. By identifying the paragraphs of the information document, the integrity of the information document and the knowledge splitting can be effectively guaranteed after the information document is split; the situation of knowledge gap after the information document is split can be effectively avoided, which is conducive to improving the accuracy of knowledge summarization and conclusion of the document processing system.
[0021] Specifically, when it is detected that the article of the information document to be processed is too long, that is, when the document length of the information document meets the document segmentation conditions in the local knowledge base, the document segmentation methods of document equidistant segmentation, paragraph segmentation and symbol segmentation can be used to segment the information document to be processed to obtain target document paragraphs, and then the summary information and keyword information are extracted from the segmented target document paragraphs, and then the information is associated to obtain the corresponding information tags; the storage method of summary information extraction and information tags is beneficial to summarizing the knowledge content of the information document to be processed and improving the storage and management efficiency of the document processing system, and it is also beneficial for users to improve the knowledge acquisition efficiency when they acquire knowledge in the subsequent knowledge acquisition; the method of vectorizing the target document paragraphs can more efficiently perform storage and knowledge acquisition queries, which is beneficial to the context relevance analysis of multiple target document paragraphs obtained by segmenting the same document, effectively avoiding the situation where the answer presented due to document segmentation has a knowledge gap, and indirectly improving the completeness and accuracy of knowledge recall; and greatly reducing the storage complexity of information documents and the complexity of document similarity calculation.
[0022] In a preferred example of the present application: the document format of the information document includes PPT format and PDF format; the method further includes:
[0023] If the document format of the information document is PPT format, convert the document format of the information document into PDF format, and convert the document content of each page of the converted information document into a segmented document image; if the document format of the information document is PDF format, convert the document content of each page of the PDF format into a segmented document image; save the segmented document image to the object storage space in the local knowledge base;
[0024] If the document content of the target document paragraph is identified as a document table or a document image, the document content of the target document paragraph is converted into a target document paragraph in the form of a mathematical vector and saved in the local knowledge base.
[0025] By adopting the above technical scheme, the local knowledge base of the present application supports document splitting in PPT format and PPT format, and the local knowledge base has stronger compatibility: that is, based on the existing technology for parsing the text content of information documents in PPT format and PDF format, information documents in PPT format and PPT format are also processed into segmented document images in image format, and then the segmented document images are saved to the object storage space in the local knowledge base. The object storage space supports various forms of data access and data management, thereby facilitating document management; at the same time, if the document content of the target document paragraph (here refers to the word format) includes a document table or a document image, the corresponding document content is converted into a target document paragraph in the form of a mathematical vector and saved in the local knowledge base. The document table or document image processed into a data vector form can better store the knowledge content in the table and the image and the contextual information association relationship in the corresponding target document paragraph, which is beneficial to ensure the accuracy of knowledge acquisition when users acquire knowledge; pictures can also be used for display when conducting knowledge display questions and answers, which means that the original style of the information document is retained, and the user's readability is improved, which is beneficial to improving the user's usage experience.
[0026] In a preferred example of the present application, the relevant documents are recalled in the local knowledge base according to the knowledge acquisition question vector and the corresponding vector feature information to obtain the initial recalled documents matching the knowledge acquisition question, including:
[0027] Determine the corresponding fixed field filtering range according to the knowledge acquisition question vector and the preset fixed filtering field; determine the initial document recall range of the knowledge acquisition question vector in the local knowledge base according to the fixed field filtering range; perform document similarity calculation in the local knowledge base using the initial document recall range to obtain the similarity between the knowledge acquisition question and the vectorized target document paragraph stored in the local knowledge base;
[0028] According to the obtained similarity between the knowledge acquisition question and the vectorized target document paragraphs stored in the local knowledge base and a preset similarity threshold, the initial document recall range is limited to obtain a document recall range;
[0029] In the document recall scope in the local knowledge base, an initial recall document matching the knowledge acquisition question is determined according to the knowledge acquisition question vector and corresponding vector feature information.
[0030] By adopting the above-mentioned technical scheme, the present application adds a method of using fixed field filtering and preliminarily narrows the scope of document recall; because in actual application, the document processing system will adopt the platform authority management method of verifying the authority of the login personnel, at this time, when the user uses the login account to log in to the document processing system, the current user's login account information can be obtained, such as the fixed filtering field adopts the department field in the login information, that is, the field of the fixed field filtering in actual application adopts the field information of the department, thereby achieving the effect of preliminarily narrowing the document retrieval scope of the local knowledge base, that is, the initial document recall scope when performing the initial document recall is determined by the fixed field filtering method; then, the initial document recall scope in the local knowledge base is used to calculate the document similarity of a large number of information documents stored in the local knowledge base to obtain the knowledge acquisition problem input by the current user and the comparison between multiple information documents. The similarity between the corresponding vectorized target document paragraphs can be calculated to improve the retrieval recall efficiency and accuracy during the initial recall through similarity calculation; in the next step, the initial document recall range is limited and narrowed through the similarity threshold to obtain the document recall range, so that the document recall accuracy during knowledge acquisition question and answering is higher; that is, by determining the initial recall document matching the knowledge acquisition question vector based on the knowledge acquisition question vector and the corresponding vector feature information in the document recall range in the local knowledge base, and storing and retrieving the target document paragraphs stored in the knowledge question vector and vectorized form, it not only meets the data processing needs of the massive information documents of the local knowledge base and improves the efficiency of information document storage and document similarity calculation, but also can meet the needs of unstructured data such as pictures, tables, and images, thereby greatly improving the knowledge recall accuracy during knowledge acquisition question and answering.
[0031] In a preferred example of the present application, the information screening and extraction of the initial recall document according to the preset knowledge acquisition strategy to obtain the answer to the knowledge acquisition question and the corresponding target knowledge document includes:
[0032] Calculating the overall weight coefficient value of each of the initial recalled documents, and sorting the initial recalled documents from high to low according to the overall weight coefficient values of all the initial recalled documents to generate a corresponding sorted list of recalled documents;
[0033] The initial recalled documents are screened based on the recalled document ranking list and a preset overall weight coefficient threshold; at least one initial recalled document obtained through screening is used as a target knowledge document corresponding to the knowledge acquisition question, and information is extracted from the target knowledge document to obtain an answer to the knowledge acquisition question.
[0034] By adopting the above-mentioned technical scheme, the present application adds a method of weight coefficient sorting and secondary document screening for initial recall documents, which is beneficial to improving the knowledge recall accuracy of the knowledge acquisition strategy; that is, after calculating the overall weight coefficient value of multiple initial recall documents through the word importance statistical algorithm, the overall weight coefficient values are arranged in order of high to obtain the corresponding recall document sorting list. In the next step, based on the recall document sorting list and the overall weight coefficient threshold, the initial recall documents with a higher overall weight coefficient threshold are screened as the target knowledge documents corresponding to the knowledge acquisition problem, and the answer corresponding to the target knowledge document is obtained, which is beneficial to greatly improve the efficiency of information management in the local knowledge base and the accuracy of summarizing and summarizing the information documents in the later stage.
[0035] In a preferred example of the present application: the method further includes:
[0036] In the local knowledge base, multiple information documents and multiple target document paragraphs with parent-child document associations are associated with fields according to preset parent-child document association fields; field relationship priorities corresponding to the parent-child association field associations;
[0037] When recalling related documents in the document recall scope in the local knowledge base, the document recall scope is updated according to the obtained parent-child document association fields of the initial recalled documents, the corresponding field relationship priorities and the preset field relationship priority threshold.
[0038] By adopting the above technical solution, parent-child documents are a storage method. Since the parent object and child object of the parent-child document are independent documents, the child document will not be re-indexed when the parent document is updated; when the child document is created, modified or deleted, the parent document or other child documents will not be affected; thereby greatly improving the knowledge acquisition efficiency and accuracy of knowledge acquisition questions and answers in the local knowledge base; the present application stores and queries by associating the field relationship of the parent-child document association fields, that is, when the information document is saved in the local knowledge base, multiple information documents with a parent-child document association relationship or multiple target document paragraphs with a parent-child document relationship (here including information documents with a parent-child relationship or other information documents with target document paragraphs); the parent-child association field is used for association marking and storage; when the relevant information documents are initially recalled based on the user's knowledge acquisition question, if the initial recalled document has a parent-child document association relationship, the corresponding field relationship priority and field relationship priority threshold are used to filter the relevant documents whose field relationship priority is greater than or equal to the field relationship priority threshold, thereby facilitating the acquisition of a more accurate document recall range and improving the accuracy of knowledge recall.
[0039] In a preferred example of the present application: the method further includes:
[0040] Perform word segmentation processing on the information document to be processed, count the number of times each word appears in the information document to be processed, and obtain corresponding word frequency statistics results;
[0041] Calculate the weight of each word according to a preset word importance statistical algorithm and corresponding word frequency statistical results to obtain a weight coefficient of each word in the information document to be processed;
[0042] According to the weight coefficient corresponding to each word, a plurality of words whose weight coefficient is greater than a preset weight coefficient threshold are selected as summary keywords of the information document to be processed;
[0043] A document summary corresponding to the information document to be processed is generated based on the plurality of summary keywords and keyword feature information corresponding to each of the summary keywords, wherein the keyword feature information includes the number of occurrences and the occurrence position of the summary keyword in the information document to be processed.
[0044] By adopting the above technical solution, in actual application, the cosine similarity algorithm and the word importance statistical algorithm can be used to perform word frequency statistics and weight coefficient calculation on the target document; the weight coefficient of each word in the information document is obtained, and then the summary keywords of multiple information documents are selected, and the document summary of the information document is generated according to the summary keywords of multiple information documents. The cosine similarity algorithm is conducive to ensuring that the generated document summary is accurate and can accurately reflect the article theme of the information document; it is conducive to narrowing the recall calculation retrieval scope when recalling knowledge documents and reducing the retrieval calculation amount of the local knowledge base; at the same time, when storing information documents, by extracting information of summary keywords from the information documents, the target document paragraphs are subsequently associated.
[0045] In the second aspect, the invention objective of the present application is achieved by adopting the following technical solutions:
[0046] A document processing system, applied to a document processing method as described above, comprises:
[0047] A user question acquisition module is used to acquire the knowledge acquisition question input by the user, vectorize the knowledge acquisition question and extract feature information to obtain the knowledge acquisition question vector and corresponding vector feature information;
[0048] A knowledge document initial recall module, used to recall relevant documents in the local knowledge base according to the knowledge acquisition question vector and corresponding vector feature information, and obtain an initial recall document matching the knowledge acquisition question;
[0049] The knowledge screening and determination module is used to screen and extract information from the initial recalled documents according to a preset knowledge acquisition strategy to obtain answers to the knowledge acquisition questions and corresponding target knowledge documents.
[0050] By adopting the above-mentioned technical scheme, when saving information documents, the present application adopts user-defined preset document splitting rules to split the information documents, wherein the document splitting rules may adopt paragraph splitting, image splitting and other document splitting rules; document preprocessing includes preprocessing operations such as splitting tables and images in the target document. The preset document splitting rules retain the integrity of the knowledge splitting of the target document, and also retain the original style for documents such as tables and images, thereby improving the document readability of users when acquiring knowledge, which is conducive to improving document management efficiency.
[0051] Furthermore, the present application also adopts a document recall method of a knowledge acquisition strategy, which vectorizes user questions to obtain vectorized knowledge acquisition question vectors and corresponding vector feature information, and then retrieves and matches the knowledge acquisition question vector with the documents in the local knowledge base based on the knowledge acquisition question vector and the corresponding vector feature information to generate initial recalled document information; in order to further improve the accuracy of knowledge recall of the local knowledge base, the initial recalled documents are filtered and screened according to the knowledge acquisition strategy to obtain a definite answer and the corresponding target knowledge document. Compared with the knowledge acquisition method of manually summarizing knowledge based on one's own experience, the knowledge acquisition strategy of the present application not only improves the efficiency of knowledge acquisition, but also improves the accuracy of knowledge acquisition, and further improves the user's experience of using the local knowledge base.
[0052] In the third aspect, the invention objective of the present application is achieved by adopting the following technical solutions:
[0053] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned document processing method when executing the computer program.
[0054] In a fourth aspect, the invention objective of the present application is achieved by adopting the following technical solutions:
[0055] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned document processing method are implemented.
[0056] In summary, the present application includes at least one of the following beneficial technical effects:
[0057] 1. When saving information documents in the local knowledge base, this application uses user-defined preset document splitting rules to split the information documents, where the document splitting rules can use paragraph splitting, image splitting and other document splitting rules; document preprocessing includes preprocessing operations such as segmenting tables and pictures in information documents. The preset document splitting rules not only retain the integrity of the knowledge splitting of the information documents, but also retain the original style for documents such as tables and pictures, thereby improving the document readability of users when acquiring knowledge, and is conducive to improving document processing efficiency and document management efficiency; further, this application also adopts a document recall method of a knowledge acquisition strategy, and obtains a vectorized knowledge acquisition question vector and corresponding vector feature information by vectorizing user questions. Then, in the local knowledge base, based on the knowledge acquisition question vector and the corresponding vector feature information, the knowledge acquisition question vector is retrieved and matched with the documents in the local knowledge base to generate the initial recall document; in order to further improve the accuracy of knowledge recall in the local knowledge base, the initial recall document is screened according to the knowledge acquisition strategy to obtain a determined answer and the corresponding target knowledge document, and then the target knowledge document is filtered to obtain the answer corresponding to the knowledge acquisition question; compared with the knowledge acquisition method of manually summarizing knowledge based on one's own experience, the knowledge acquisition strategy of this application not only improves the efficiency of knowledge acquisition, reduces the cost of information document management and maintenance, but also improves the accuracy of knowledge acquisition, and further improves the user experience of the local knowledge base; 2.The present application adopts a method of preprocessing the target knowledge document (i.e., the information document to be processed) and storing it after custom splitting. The document splitting can be performed according to the user's selection and pre-defined document splitting rules. By identifying the paragraphs of the information document, the integrity of the information document splitting and the knowledge splitting can be effectively guaranteed. The situation of knowledge gap after the information document splitting can be effectively avoided, which is conducive to improving the accuracy of the knowledge summarization and summary of the document processing system. Specifically, when it is detected that the article of the information document to be processed is too long, that is, when the document length of the information document meets the document segmentation conditions in the local knowledge base, the document splitting methods of document equidistant segmentation, paragraph segmentation and symbol segmentation can be adopted to split the information document to be processed to obtain the target document paragraphs, and then the split target document segments are processed. The summary information and keyword information are extracted, and then the information is associated to obtain the corresponding information tags; the storage method of the summary information extraction and information tags is not only conducive to summarizing the knowledge content of the information documents to be processed and improving the storage and management efficiency of the document processing system, but also conducive to improving the knowledge acquisition efficiency of users in subsequent knowledge acquisition; the method of vectorizing the target document paragraphs can be more efficiently stored and queried for knowledge acquisition, which is conducive to the context relevance analysis of multiple target document paragraphs obtained by splitting from the same document, effectively avoiding the situation where the answers presented due to document splitting have knowledge gaps, and indirectly improving the completeness and accuracy of knowledge recall; and greatly reducing the storage complexity of information documents and the complexity of document similarity calculation; 3.The present application adds a method of using fixed field filtering to preliminarily narrow the scope of document recall; because in actual application, the document processing system will adopt the platform authority management method of verifying the authority of the login personnel, at this time, when the user uses the login account to log in to the document processing system, the current user's login account information can be obtained. For example, the fixed filtering field adopts the department field in the login information, that is, the field of the fixed field filtering in actual application adopts the field information of the department, thereby achieving the effect of preliminarily narrowing the document retrieval scope of the local knowledge base, that is, the initial document recall scope when performing the initial document recall is determined by the fixed field filtering method; then, the initial document recall scope in the local knowledge base is used to calculate the document similarity of a large number of information documents stored in the local knowledge base to obtain the vectorized information corresponding to the knowledge acquisition problem input by the current user and the multiple information documents. The similarity between target document paragraphs can improve the efficiency and accuracy of retrieval recall during the initial recall through similarity calculation; the next step is to limit the scope of the initial document recall through the similarity threshold to obtain the document recall scope, so that the accuracy of document recall during knowledge acquisition question and answer is higher; that is, by determining the initial recall document matching the knowledge acquisition question vector in the document recall scope in the local knowledge base based on the knowledge acquisition question vector and the corresponding vector feature information, and storing and retrieving the target document paragraphs stored in the knowledge question vector and vectorized form, it not only meets the data processing requirements of the local knowledge base for massive information documents, improves the efficiency of information document storage and document similarity calculation, but also can meet the requirements of unstructured data such as pictures, tables, and images, thereby greatly improving the accuracy of knowledge recall during knowledge acquisition question and answer. . BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 is a flow chart of a document processing method in one embodiment of the present application;
[0059] Figure 2 is a flowchart of step S10 in a document processing method in one embodiment of the present application;
[0060] Figure 3 is a flowchart of step S2 in a document processing method in one embodiment of the present application;
[0061] Figure 4 It is a schematic diagram of a device in an embodiment of the present application. DETAILED DESCRIPTION
[0062] The present application is further described in detail below in conjunction with the accompanying drawings.
[0063] In one embodiment, if Figure 1As shown, the present application discloses a document processing method, which is applied to a local knowledge base. The local knowledge base stores multiple information documents. The information documents are preprocessed and split according to a preset document splitting rule to obtain target document paragraphs. The target document paragraphs are stored in the local knowledge base and associated with the corresponding information documents. The document processing method specifically includes the following steps:
[0064] S1: Obtain the knowledge acquisition question input by the user, vectorize the knowledge acquisition question and extract feature information to obtain the knowledge acquisition question vector and corresponding vector feature information.
[0065] In this embodiment, when saving information documents in the local knowledge base, this application uses user-defined preset document splitting rules to split the information documents, wherein the document splitting rules can use paragraph splitting, image splitting, document equidistant splitting (split according to the width set by the user), paragraph splitting, symbol splitting (such as splitting according to the period) and other document splitting rules; document preprocessing includes preprocessing operations such as splitting tables and pictures in the information documents. The preset document splitting rules not only retain the integrity of the knowledge splitting of the information document, but also retain the original style for documents such as tables and pictures, improve the document readability when users acquire knowledge, and help improve document processing efficiency and document management efficiency.
[0066] Specifically, the present application adopts a document recall method of a knowledge acquisition strategy, and obtains a vectorized knowledge acquisition question vector and corresponding vector feature information by vectorizing user questions.
[0067] S2: Based on the knowledge acquisition question vector and the corresponding vector feature information, relevant documents are recalled in the local knowledge base to obtain the initial recalled documents that match the knowledge acquisition question.
[0068] In this embodiment, the knowledge acquisition question vector is retrieved and matched with the documents in the local knowledge base based on the knowledge acquisition question vector and the corresponding vector feature information, so as to generate an initial recall document.
[0069] S3: Information is screened and extracted from the initial recalled documents according to the preset knowledge acquisition strategy to obtain the answer to the knowledge acquisition question and the corresponding target knowledge document.
[0070] In this embodiment, in order to further improve the accuracy of knowledge recall of the local knowledge base, the initial recalled documents are screened according to the knowledge acquisition strategy to obtain a definite answer and a corresponding target knowledge document, and then the target knowledge document is filtered to obtain an answer corresponding to the knowledge acquisition question; compared with the knowledge acquisition method of manually summarizing knowledge based on one's own experience, the knowledge acquisition strategy of the present application not only improves the efficiency of knowledge acquisition, reduces the cost of information document management and maintenance, but also improves the accuracy of knowledge acquisition, and further improves the user experience of the local knowledge base.
[0071] Furthermore, this document processing platform is compatible with third-party systems such as Feishu, DingTalk, etc. When obtaining information documents, information documents from third-party systems can be obtained for document processing and knowledge document storage.
[0072] Furthermore, a large language model is stored in the local knowledge base, and by setting up question and answer configuration and knowledge question and answer configuration, the existing question and answer mapping is used to reply to questions to achieve the purpose of knowledge correction; at the same time, the function of automatic question and answer generation is also set up, using openai to automatically generate questions for information document titles, and then store the corresponding answers for automatic prompts when front-end users enter knowledge acquisition questions.
[0073] In one embodiment, the document processing method further includes:
[0074] S10: Obtain the information document to be processed, preprocess and split the information document according to the preset document splitting rules, obtain the target document paragraphs, store the target document paragraphs in the local knowledge base, and associate them with the corresponding information document.
[0075] In this embodiment, the present application adopts a method of preprocessing and custom splitting the target knowledge document (i.e., the information document to be processed) for storage, and can perform document splitting according to user selection and pre-defined document splitting rules. By identifying the paragraphs of the information document, it can effectively ensure the integrity of the information document after it is split and the integrity of the knowledge splitting; effectively avoid the occurrence of knowledge gaps after the information document is split, which is conducive to improving the accuracy of knowledge summarization and summary of the document processing system.
[0076] Specifically, Figure 2 As shown, the information document to be processed is obtained, the information document is preprocessed and split according to the preset document splitting rules, the target document paragraph is obtained, and the target document paragraph is stored in the local knowledge base and associated with the corresponding information document, including the following steps:
[0077] S101: Acquire an information document to be processed, and identify the document length of the information document to be processed.
[0078] S102: When the document length of the information document to be processed meets the preset document segmentation condition, a preset document segmentation rule for the information document to be processed is selected according to the acquired segmentation selection instruction, and the document segmentation rule includes document equidistant segmentation, paragraph segmentation and symbol segmentation.
[0079] In this embodiment, when it is detected that the article of the information document to be processed is too long, that is, when the document length of the information document meets the document segmentation condition in the local knowledge base, the information document needs to be split.
[0080] S103: splitting the information document to be processed according to the selected preset document splitting rule to obtain target document paragraphs.
[0081] S104: extracting summary information and keywords from the target document paragraph to obtain corresponding information tags, and associating the target document paragraph with the corresponding information document according to the mapping relationship between the target document paragraph and the corresponding information tag.
[0082] In this embodiment, the storage method of abstract information extraction and information tags is conducive to summarizing the knowledge content of the information document to be processed and improving the storage and management efficiency of the document processing system, and is also conducive to improving the knowledge acquisition efficiency of users in subsequent knowledge acquisition.
[0083] S105: Perform vectorization processing on the target document paragraph to obtain a vectorized target document paragraph; and store the vectorized target document paragraph in a local knowledge base.
[0084] In this embodiment, the method of vectorizing the target document paragraphs can more efficiently perform storage and knowledge acquisition queries, which is conducive to contextual correlation analysis of multiple target document paragraphs obtained by splitting from the same document, effectively avoiding the situation where knowledge gaps appear in the answers presented due to document splitting, and indirectly improving the completeness and accuracy of knowledge recall; and greatly reducing the storage complexity of information documents and the complexity of document similarity calculation.
[0085] Specifically, when adopting the document splitting method of paragraph splitting, the full-text paragraphs of the information document can be combined with multiple hierarchical titles in the information document, and the information document can be split into a tree structure according to the title level, that is, multiple sub-text paragraphs corresponding to each hierarchical title are obtained. For sub-text paragraphs with parent-child document relationships, they are respectively marked as parent objects and child objects in the parent-child documents, and when extracting summary information, the corresponding associations are marked as parent text summary and child text summary.
[0086] In one embodiment, the document processing method further includes:
[0087] S11: if the document format of the information document is PPT format, convert the document format of the information document into PDF format, and convert the document content of each page of the converted information document into a segmented document image; if the document format of the information document is PDF format, convert the document content of each page of the PDF format into a segmented document image; and save the segmented document image to the object storage space in the local knowledge base;
[0088] Specifically, the local knowledge base of the present application supports document formats in PPT format and document splitting in PPT format, and the local knowledge base has stronger compatibility: that is, based on the existing technology for parsing the text content of information documents in PPT format and PDF format, information documents in PPT format and PPT format are also processed into segmented document images in image format, and then the segmented document images are saved to the object storage space in the local knowledge base, which is also called the OSS storage space of the local knowledge base; the object storage space supports various forms of data access and data management, thereby facilitating document management.
[0089] S12: If the document content of the target document paragraph is identified as a document table or a document image, the document content of the target document paragraph is converted into a target document paragraph in the form of a mathematical vector, and saved in a local knowledge base.
[0090] Specifically, if the document content of the target document paragraph (here in word format) includes document tables or document images, the corresponding document content is converted into a target document paragraph in the form of a mathematical vector and saved in the local knowledge base. The document table or document image processed into a data vector form can better store the relationship between the knowledge content in the table and the image and the contextual information in the corresponding target document paragraph, which is beneficial to ensure the accuracy of knowledge acquisition when the user acquires knowledge; pictures can also be used for display when conducting knowledge display and question-and-answer sessions, which retains the original style of the information document and improves the user's readability, which is beneficial to improving the user's usage experience.
[0091] In one embodiment, if Figure 3 As shown, in step S2, according to the knowledge acquisition question vector and the corresponding vector feature information, relevant documents are recalled in the local knowledge base to obtain the initial recalled documents matching the knowledge acquisition question, including:
[0092] S21: Determine a corresponding fixed field filtering range based on the knowledge acquisition question vector and a preset fixed filtering field; determine an initial document recall range of the knowledge acquisition question vector in the local knowledge base based on the fixed field filtering range.
[0093] In this embodiment, the present application adds a method of using fixed field filtering and preliminarily narrows the scope of document recall; because in actual application, the document processing system will adopt the platform authority management method of verifying the authority of the login personnel, at this time, when the user uses the login account to log in to the document processing system, the current user's login account information can be obtained, such as the fixed filtering field adopts the department field in the login information, that is, the field of the fixed field filtering in actual application adopts field information such as the department, thereby achieving the effect of preliminarily narrowing the document retrieval scope of the local knowledge base, that is, determining the initial document recall scope when performing the initial document recall through fixed field filtering.
[0094] S22: Calculate document similarity in the local knowledge base using the initial document recall range to obtain the similarity between the knowledge acquisition problem and the vectorized target document paragraph stored in the local knowledge base.
[0095] Specifically, after obtaining the initial document recall range in the local knowledge base, the initial document recall range in the local knowledge base is used to perform document similarity calculation on a large number of information documents stored in the local knowledge base to obtain the similarity between the knowledge acquisition question input by the current user and the vectorized target document paragraphs corresponding to the multiple information documents. The similarity calculation can improve the retrieval recall efficiency and accuracy during the initial recall.
[0096] S23: According to the similarity between the obtained knowledge acquisition question and the vectorized target document paragraphs stored in the local knowledge base and a preset similarity threshold, the initial document recall range is limited to obtain a document recall range.
[0097] In this embodiment, in the next step, the initial document recall range is limited and narrowed by a similarity threshold to obtain a document recall range, so that the document recall accuracy during knowledge acquisition question and answering is higher.
[0098] S24: In the document recall scope in the local knowledge base, determine the initial recall document matching the knowledge acquisition question according to the knowledge acquisition question vector and the corresponding vector feature information.
[0099] Specifically, by determining the initial recall document that matches the knowledge acquisition question vector within the document recall range in the local knowledge base based on the knowledge acquisition question vector and the corresponding vector feature information, and by storing and retrieving the knowledge question vector and the target document paragraphs stored in vectorized form, it not only meets the data processing needs of massive information documents in the local knowledge base and improves the efficiency of information document storage and document similarity calculation, but also can meet the needs of unstructured data such as pictures, tables, and images, thereby greatly improving the accuracy of knowledge recall when conducting knowledge acquisition questions and answers.
[0100] In one embodiment, in step S3, information is screened and extracted from the initial recall document according to a preset knowledge acquisition strategy to obtain an answer to the knowledge acquisition question and a corresponding target knowledge document, including:
[0101] S31: Calculate the overall weight coefficient value of each initial recall document in all the initial recall documents, and sort the documents from high to low according to the overall weight coefficient values of all the initial recall documents to generate a corresponding sorted list of recalled documents.
[0102] In this embodiment, the present application adds a method of weight coefficient sorting and secondary document screening for the initial recall documents, which is beneficial to improving the knowledge recall accuracy of the knowledge acquisition strategy; that is, after calculating the overall weight coefficient values of multiple initial recall documents through a word importance statistical algorithm, the overall weight coefficient values are arranged in order of high to low to obtain a corresponding recalled document sorting list.
[0103] Specifically, TF-IDF is used to perform secondary sorting on the recalled information documents. The calculation steps are as follows:
[0104] (1) Calculate TF (word frequency)
[0105] For each information document, count the number of occurrences of each word.
[0106] Divide the number of times each word appears by the total number of words in the document to get the word frequency (TF) of the word in the information document.
[0107] (2) Calculate IDF (Inverse Document Frequency)
[0108] Count the number of documents in the local knowledge base that contain a specific word.
[0109] Use the formula IDF = log e The inverse document frequency is calculated by (total number of documents / number of documents containing the word). Usually, in order to avoid the denominator being 0, 1 is added to the number of documents containing the word.
[0110] (3) Calculate TF-IDF value
[0111] Multiply the TF value of each word by the corresponding IDF value to obtain the TF-IDF value of the word in the information document; perform this operation on each word in the information document, and add up the TF-IDF values of all words to obtain the overall TF-IDF value of the information document (i.e., the overall weight coefficient value), that is, the overall weight coefficient value of each information document. S32: Screen the initial recalled documents based on the recalled document sorting list and the preset overall weight coefficient threshold; use at least one initial recalled document screened as the target knowledge document corresponding to the knowledge acquisition problem, and extract information from the target knowledge document to obtain the answer to the corresponding knowledge acquisition problem.
[0112] Specifically, based on the sorted list of recalled documents and the overall weight coefficient threshold, the initial recalled documents with a higher overall weight coefficient threshold are screened as the target knowledge documents corresponding to the knowledge acquisition problem, and the answers corresponding to the target knowledge documents are obtained, which is conducive to greatly improving the efficiency of information management in the local knowledge base and the accuracy of summarizing the information documents in the later stage.
[0113] In one embodiment, the document processing method further includes:
[0114] S111: In the local knowledge base, multiple information documents and multiple target document paragraphs that have parent-child document associations are associated with fields according to preset parent-child document association fields; and field relationship priorities corresponding to the parent-child association field associations.
[0115] In this embodiment, parent-child documents are a storage method. Since the parent object and child object of the parent-child document are independent documents, the child document will not be re-indexed when the parent document is updated; when the child document is created, modified or deleted, it will not affect the parent document or other child documents; thereby greatly improving the efficiency and accuracy of knowledge acquisition in the local knowledge base for knowledge acquisition and question answering.
[0116] Specifically, storage and query are performed through the field relationship association of parent-child document association fields, that is, when information documents are saved into the local knowledge base, multiple information documents with parent-child document association relationships or multiple target document paragraphs with parent-child document relationships (including information documents with parent-child relationships or target document paragraphs of other information documents) are stored and marked using parent-child association fields for association marking.
[0117] S112: When recalling related documents in the document recall scope in the local knowledge base, the document recall scope is updated according to the obtained parent-child document association fields of the initial recalled document, the corresponding field relationship priority and the preset field relationship priority threshold.
[0118] Specifically, when the relevant information documents are initially recalled based on the user's knowledge acquisition problem, if the initial recalled documents have a parent-child document relationship, the corresponding field relationship priority and field relationship priority threshold are used to filter out relevant documents whose field relationship priority is greater than or equal to the field relationship priority threshold, thereby facilitating the acquisition of a more accurate document recall range and improving the accuracy of knowledge recall.
[0119] In one embodiment, the document processing method further includes:
[0120] S121: Perform word segmentation processing on the information document to be processed, count the number of times each word appears in the information document to be processed, and obtain corresponding word frequency statistics results.
[0121] S122: Calculate the weight of each word according to a preset word importance statistical algorithm and corresponding word frequency statistical results to obtain a weight coefficient of each word in the information document to be processed.
[0122] Specifically, word importance statistical algorithms such as the TF-IDF algorithm; in actual application, the cosine similarity algorithm and the word importance statistical algorithm can be used to perform word frequency statistics and weight coefficient calculation on the target document; the weight coefficient of each word in the information document is obtained, and then the summary keywords of multiple information documents are selected, and the document summary of the information document is generated according to the summary keywords of multiple information documents. The cosine similarity algorithm is conducive to ensuring that the generated document summary is accurate and can accurately reflect the article theme of the information document; it is conducive to narrowing the recall calculation retrieval scope when recalling knowledge documents and reducing the retrieval calculation amount of the local knowledge base.
[0123] S123: According to the weight coefficient corresponding to each word, multiple words whose weight coefficients are greater than a preset weight coefficient threshold are selected as summary keywords of the information document to be processed.
[0124] S124: Generate a document summary of the information document to be processed based on multiple summary keywords and keyword feature information corresponding to each summary keyword, where the keyword feature information includes the number of occurrences and the occurrence position of the summary keyword in the information document to be processed.
[0125] Specifically, when storing information documents, the information of summary keywords is extracted from the information documents and then associated with target document paragraphs; the corresponding document summary is generated based on the keyword feature information of the entire information document, so that after the same information document is subsequently split into multiple target document paragraphs, the summary keywords and context associations of the multiple target document paragraphs obtained by the split are used to obtain the association relationship of information tags between the multiple target document paragraphs, so that when recalling knowledge documents, information screening and extraction can be performed according to the knowledge acquisition question vector.
[0126] It should be understood that the serial numbers of the steps in the above embodiments do not imply a sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0127] In one embodiment, a document processing system is provided, and the document processing system corresponds to a document processing method in the above embodiment.
[0128] A document processing system includes a user question acquisition module, a knowledge document initial recall module, and a knowledge screening and determination module. The detailed description of each functional module is as follows:
[0129] A document processing system, applied to a document processing method as described above, comprises:
[0130] A user question acquisition module is used to obtain the knowledge acquisition question input by the user, vectorize the knowledge acquisition question and extract feature information to obtain the knowledge acquisition question vector and corresponding vector feature information;
[0131] The knowledge document initial recall module is used to recall relevant documents in the local knowledge base based on the knowledge acquisition question vector and the corresponding vector feature information, and obtain the initial recall document matching the knowledge acquisition question;
[0132] The knowledge screening and determination module is used to screen and extract information from the initial recalled documents according to the preset knowledge acquisition strategy to obtain the answer to the knowledge acquisition question and the corresponding target knowledge document.
[0133] For the specific definition of a document processing system, please refer to the definition of a document processing method in the above text, which will not be repeated here; each module in the above-mentioned document processing system can be implemented in whole or in part by software, hardware and a combination thereof; each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0134] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store knowledge acquisition problems, large language models and information documents, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a document processing method is implemented.
[0135] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0136] S1: Obtain the knowledge acquisition question input by the user, vectorize the knowledge acquisition question and extract feature information to obtain the knowledge acquisition question vector and corresponding vector feature information;
[0137] S2: Based on the knowledge acquisition question vector and the corresponding vector feature information, relevant documents are recalled in the local knowledge base to obtain the initial recalled documents that match the knowledge acquisition question;
[0138] S3: Information is screened and extracted from the initial recalled documents according to the preset knowledge acquisition strategy to obtain the answer to the knowledge acquisition question and the corresponding target knowledge document.
[0139] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0140] S1: Obtain the knowledge acquisition question input by the user, vectorize the knowledge acquisition question and extract feature information to obtain the knowledge acquisition question vector and corresponding vector feature information;
[0141] S2: Based on the knowledge acquisition question vector and the corresponding vector feature information, relevant documents are recalled in the local knowledge base to obtain the initial recalled documents that match the knowledge acquisition question;
[0142] S3: Information is screened and extracted from the initial recalled documents according to the preset knowledge acquisition strategy to obtain the answer to the knowledge acquisition question and the corresponding target knowledge document.
[0143] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0144] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0145] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some of the features thereof may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A document processing method, characterized in that: Applied to a local knowledge base, the local knowledge base stores a plurality of information documents, the information documents are preprocessed and split according to a preset document splitting rule to obtain target document paragraphs, the target document paragraphs are stored in the local knowledge base, and are associated with corresponding information documents; The document processing method comprises: Obtaining a knowledge acquisition question input by a user, performing vectorization processing and feature information extraction on the knowledge acquisition question, and obtaining a knowledge acquisition question vector and corresponding vector feature information; Recalling relevant documents in the local knowledge base according to the knowledge acquisition question vector and corresponding vector feature information to obtain initial recalled documents matching the knowledge acquisition question; Screening and extracting information from the initial recall document according to a preset knowledge acquisition strategy to obtain an answer to the knowledge acquisition question and a corresponding target knowledge document; The step of recalling relevant documents in the local knowledge base based on the knowledge acquisition question vector and the corresponding vector feature information to obtain an initial recall document matching the knowledge acquisition question includes: Determine a corresponding fixed field filtering range according to the knowledge acquisition question vector and a preset fixed filtering field; determine an initial document recall range of the knowledge acquisition question vector in the local knowledge base according to the fixed field filtering range; Calculating document similarity in the local knowledge base using the initial document recall range to obtain the similarity between the knowledge acquisition question and the vectorized target document paragraph stored in the local knowledge base; According to the obtained similarity between the knowledge acquisition question and the vectorized target document paragraphs stored in the local knowledge base and a preset similarity threshold, the initial document recall range is limited to obtain a document recall range; In the document recall range in the local knowledge base, determining an initial recall document matching the knowledge acquisition question according to the knowledge acquisition question vector and corresponding vector feature information; The method further comprises: In the local knowledge base, multiple information documents and multiple target document paragraphs that have parent-child document associations are associated with fields according to preset parent-child document association fields; field relationship priorities corresponding to the parent-child document association field associations; When recalling related documents in the document recall scope in the local knowledge base, the document recall scope is updated according to the obtained parent-child document association fields of the initial recalled documents, the corresponding field relationship priorities and the preset field relationship priority threshold.
2. A document processing method according to claim 1, characterized in that: The method further comprises: Acquire the information document to be processed, pre-process and split the information document according to the preset document splitting rule to obtain the target document paragraph, store the target document paragraph in the local knowledge base, and associate it with the corresponding information document; The step of obtaining the information document to be processed, preprocessing and splitting the information document according to a preset document splitting rule to obtain a target document paragraph, and storing the target document paragraph in the local knowledge base and associating the target document with the corresponding information document includes: Acquire an information document to be processed, and identify the document length of the information document to be processed; When the document length of the information document to be processed meets the preset document segmentation condition, a preset document segmentation rule of the information document to be processed is selected according to the acquired segmentation selection instruction, and the document segmentation rule includes document equidistant segmentation, paragraph segmentation and symbol segmentation; Splitting the information document to be processed according to the selected preset document splitting rule to obtain target document paragraphs; Extracting summary information and keywords from the target document paragraph to obtain corresponding information tags, and associating the target document paragraph with the corresponding information document according to the mapping relationship between the target document paragraph and the corresponding information tag; Performing vectorization processing on the target document paragraph to obtain a vectorized target document paragraph; The vectorized target document paragraph is stored in the local knowledge base.
3. A document processing method according to claim 2, characterized in that: The document format of the information document includes PPT format and PDF format; the method further includes: If the document format of the information document is PPT format, convert the document format of the information document into PDF format, and convert the document content of each page of the converted information document into a segmented document image; if the document format of the information document is PDF format, convert the document content of each page of the PDF format into a segmented document image; save the segmented document image to the object storage space in the local knowledge base; If the document content of the target document paragraph is identified as a document table or a document image, the document content of the target document paragraph is converted into a target document paragraph in the form of a mathematical vector and saved in the local knowledge base.
4. A document processing method according to claim 1 or 3, characterized in that: The step of screening and extracting information from the initial recall document according to a preset knowledge acquisition strategy to obtain an answer to the knowledge acquisition question and a corresponding target knowledge document includes: Calculating the overall weight coefficient value of each of the initial recalled documents, and sorting the initial recalled documents from high to low according to the overall weight coefficient values of all the initial recalled documents to generate a corresponding sorted list of recalled documents; The initial recalled documents are screened based on the recalled document ranking list and a preset overall weight coefficient threshold; at least one initial recalled document obtained through screening is used as a target knowledge document corresponding to the knowledge acquisition question, and information is extracted from the target knowledge document to obtain an answer to the knowledge acquisition question.
5. A document processing method according to claim 1, characterized in that: The method further comprises: Perform word segmentation on the information document to be processed, count the number of times each word appears in the information document to be processed, and obtain the corresponding word frequency statistics result; Calculate the weight of each word according to the preset word importance statistical algorithm and the corresponding word frequency statistical results to obtain the weight coefficient of each word in the information document to be processed; According to the weight coefficient corresponding to each word, multiple words whose weight coefficient is greater than a preset weight coefficient threshold are selected as summary keywords of the information document to be processed; A document summary of the information document to be processed is generated based on the multiple summary keywords and keyword feature information corresponding to each of the summary keywords, wherein the keyword feature information includes the number of occurrences and the occurrence position of the summary keyword in the information document to be processed.
6. A document processing system, characterized in that: A document processing method according to any one of claims 1 to 5, wherein the system comprises: A user question acquisition module is used to acquire the knowledge acquisition question input by the user, vectorize the knowledge acquisition question and extract feature information to obtain the knowledge acquisition question vector and corresponding vector feature information; A knowledge document initial recall module, used to recall relevant documents in the local knowledge base according to the knowledge acquisition question vector and corresponding vector feature information, and obtain an initial recall document matching the knowledge acquisition question; The knowledge screening and determination module is used to screen and extract information from the initial recalled documents according to a preset knowledge acquisition strategy to obtain answers to the knowledge acquisition questions and corresponding target knowledge documents.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the document processing method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a document processing method as claimed in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Medical question answering processing method and device based on network resources
CN114780672A
Text abstract generation method and device and electronic equipment
CN116361446A
Question response method and device based on large language model
CN117235226A