Intelligent office process processing method and system based on large language model
By building an enterprise knowledge base and using large language models to deal with user problems, the intelligence and automation of office processes are achieved, and the problems of limited intelligence level of office process processing methods and low data utilization efficiency in the existing technology are solved, improving office efficiency and user experience.
Patent Information
- Application Number
- CN202411700002.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
AI Technical Summary
The existing office process processing methods only focus on the automation of a single function, making it difficult to achieve comprehensive optimization of the entire office process, the level of intelligence is limited, and it is impossible to effectively mine and analyze corporate text data, have poor user experience, high learning cost, and complex operations.
Using an intelligent office process processing method based on a large language model, we obtain corporate documents, analyze documents, cut and extract key information, build an enterprise knowledge base based on ES database, receive user questions, recall semantic text blocks and keyword text blocks, use the large language model to generate answers, and automatically fill in the work order.
It improves data management and utilization efficiency, improves the system's understanding and response effect of complex problems, reduces manual intervention, improves the accuracy and efficiency of problem handling, reduces learning costs, improves user experience and work efficiency, and realizes automation and efficient management of office processes.
Smart Images

Figure CN119648136A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to an intelligent office process processing method and system based on a large language model. Background Art
[0002] The intelligent office process processing method and system based on the large language model is designed to automate the processing of enterprise office processes. The system uses the powerful natural language processing capabilities of the large language model to parse and extract knowledge from enterprise documents and build a knowledge base. When users raise questions related to office processes, the system can automatically retrieve relevant information and automatically fill in the work order interface parameters. At the same time, the system has a built-in approval rule checking function to ensure that the approval is automatically completed after the work order meets the requirements, which significantly improves the automation and intelligence level of the enterprise office process.
[0003] As enterprises expand in size and their businesses become more complex, the traditional office model can no longer meet the needs of efficiency, accuracy, and intelligence. Enterprises have accumulated a large amount of documents and data in their daily operations. How to efficiently manage and utilize this data to support quick decision-making and optimize business processes has become an urgent problem to be solved.
[0004] However, the existing office process processing methods only focus on the automation of a single function, and it is difficult to achieve comprehensive optimization of the entire office process. For complex office tasks, the intelligence level of traditional systems is limited and it is difficult to reach the processing level of human experts. A large amount of text data and business records are accumulated in the daily operations of enterprises, but most of the existing systems only support simple keyword searches or single information extraction, and cannot effectively mine and analyze these data, limiting the value of enterprise data. Existing systems usually require users to have a high technical background, the interactive interface is not intuitive enough, the learning cost is high, the operation is complicated, and it is difficult to popularize, resulting in low office efficiency, high error rate, and poor user experience. Summary of the invention
[0005] In view of the fact that the existing office process processing methods in the prior art only focus on the automation of a single function, it is difficult to achieve comprehensive optimization of the entire office process. For complex office tasks, the intelligence level of traditional systems is limited and it is difficult to reach the processing level of human experts. A large amount of text data and business records are accumulated in the daily operations of enterprises, but most of the existing systems only support simple keyword searches or single information extraction, and cannot effectively mine and analyze these data, which limits the value of enterprise data. Existing systems usually require users to have a high technical background, the interactive interface is not intuitive enough, the learning cost is high, the operation is complicated, and it is difficult to popularize, resulting in low office efficiency and high error rate. Technical problems. The present invention provides an intelligent office process processing method and system based on a large language model.
[0006] In a first aspect of the present invention, a method for intelligent office process processing based on a large language model is proposed, the method comprising:
[0007] S1, obtain enterprise documents;
[0008] S2, document parsing, document segmentation and key information extraction of enterprise documents in sequence;
[0009] S3, builds an enterprise knowledge base based on the ES library according to the extracted content;
[0010] S4, receiving user questions about office processes;
[0011] S5, recalling semantic text blocks and keyword text blocks about the user's question in the enterprise knowledge base, and splicing the semantic text blocks and keyword text blocks using the large language model to obtain the user question answer;
[0012] S6: Take the user question and the answer to the user question as a question-answer pair, and use the large language model to automatically fill in the office process work order of the question-answer pair according to the preset work order filling rules;
[0013] S7: Output the completed office process work order.
[0014] A second aspect of the present invention provides an intelligent office process processing system based on a large language model, comprising: a memory and a processor;
[0015] An application is stored in the memory, and the application is suitable for being executed by the processor to implement the intelligent office process processing method based on a large language model of the first aspect.
[0016] The beneficial effects of the present invention are as follows:
[0017] In an embodiment of the present invention, by segmenting the document content and extracting key information, the system can quickly build an enterprise knowledge base based on the ES library, convert the information in the enterprise's massive documents into structured and searchable knowledge base resources, effectively mine and analyze document information, and provide a data basis for subsequent intelligent retrieval, thereby improving data management and utilization efficiency. By recalling semantic text blocks and keyword text blocks related to the problem from the knowledge base and using a large language model to generate accurate answers, the system's understanding and response to complex problems are improved, human intervention is reduced, and the accuracy and efficiency of problem handling are improved. By using a large language model for question answering and automatic filling of work orders, users only need to enter natural language to obtain intelligent processing results. The learning cost is low, the operation is convenient, and the user experience and work efficiency are improved. By building a knowledge base, question answering and work order filling are automatically completed, office process automation is realized, and overall office efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0019] Figure 1 It is a flowchart of an intelligent office process processing method based on a large language model provided by an embodiment of the present invention;
[0020] Figure 2 It is a flow chart of constructing an enterprise office knowledge base provided by an embodiment of the present invention;
[0021] Figure 3 is a flow chart of office knowledge question and answer provided by an embodiment of the present invention;
[0022] Figure 4 The present invention provides an automatic work order flow chart.
[0023] Figure 5 It is a structural diagram of an intelligent office process processing system based on a large language model provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.
[0025] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.
[0026] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.
[0028] The present invention proposes an intelligent office process processing method and system based on a large language model to solve the problems of cold start, sparse data and relatively simple recommendation in traditional recommendation methods, which leads to a decrease in user experience and the effectiveness of recommendation results, and thus cannot better adapt to changes in user personalized needs.
[0029] Method Embodiment
[0030] Reference Manual Attached Figure 1 , showing a flow chart of an intelligent office process processing method based on a large language model provided by an embodiment of the present invention.
[0031] An embodiment of the present invention provides a method for processing an intelligent office process based on a large language model, the method comprising:
[0032] Specifically, the method includes steps S1 to S7.
[0033] S1, obtain enterprise documents.
[0034] Reference Manual Attached Figure 2 , showing a flow chart of building an enterprise office knowledge base provided by an embodiment of the present invention.
[0035] like Figure 2 , through steps such as watermark removal, layout analysis, OCR, etc., the scanned PDF, text version PDF, and Docx and Xlsx format documents are parsed, the text and table content are extracted, the document is divided into blocks according to semantics and structure, and text blocks of appropriate granularity are generated. The text blocks are processed by named entity recognition, key information extraction, dependency syntax analysis and keyword extraction to obtain structured information, providing basic data for the construction of enterprise knowledge base.
[0036] S2, performs document parsing, document segmentation and key information extraction on corporate documents in sequence.
[0037] It should be noted that by parsing and cutting documents and extracting key information, the efficiency of document processing is improved, the accuracy and completeness of information are guaranteed, and massive corporate documents are effectively converted into high-value data in the knowledge base, which is convenient for rapid retrieval and analysis, thereby improving the company's knowledge management level and office efficiency.
[0038] In a possible implementation, the enterprise documents include scanned PDF enterprise documents, text PDF enterprise documents, docx file enterprise documents and xlsx file enterprise documents.
[0039] Among them, the scanned PDF corporate document refers to a PDF file stored in a scanned form, which usually contains text information in image format. The text version of the PDF corporate document refers to a PDF file that directly saves the text content, and the text information can be directly extracted. The docx file corporate document refers to the document format of Microsoft Word, which contains text, tables, pictures and other content. The xlsx file corporate document refers to the spreadsheet format of Microsoft Excel, which is often used to store structured data and table information.
[0040] S2 specifically includes:
[0041] S201, respectively parse the scanned pdf corporate document, the text-based pdf corporate document, the docx file corporate document and the xlsx file corporate document to obtain complete texts.
[0042] It should be noted that by parsing documents in different formats and extracting the complete text, it is convenient for subsequent unified processing and analysis to ensure the comprehensiveness and completeness of the information.
[0043] S202, performing document segmentation including semantic segmentation and structural segmentation on the complete text, and segmenting the complete text into text blocks of different granularities.
[0044] Among them, a text block refers to a smaller content unit obtained after cutting a document, representing a fragment of a document, which facilitates subsequent information extraction and knowledge base construction.
[0045] It should be noted that through semantic and structural cutting, the complete text is divided into text blocks of different granularities, making information processing more refined and facilitating accurate retrieval and semantic analysis.
[0046] S203, extracting dependency syntax trees, keywords and named entities in the text block.
[0047] Among them, the dependency syntax tree is a syntactic structure representation method used to display the dependency relationship between words in a sentence and help understand the semantic structure of the sentence. Keywords are core words or phrases extracted from the text, which can represent the main content of the text and help improve the efficiency of information retrieval. Named entities refer to entities with specific meanings in the text, such as names of people, places, organizations, time, etc. By identifying these entities, key information can be extracted.
[0048] It should be noted that by extracting dependency syntax trees, keywords and named entities in text blocks, the core content can be accurately extracted, the semantic understanding ability of the knowledge base can be improved, and the accuracy and efficiency of retrieval can be improved.
[0049] In a possible implementation, the document parsing of the scanned PDF enterprise document in S201 specifically includes:
[0050] Remove watermarks from scanned PDF corporate documents based on grayscale images.
[0051] Among them, grayscale image is a form of image processing, which converts color images into grayscale (black and white) images so that each pixel contains only brightness information without color. It is usually used for image analysis and processing. Watermark refers to semi-transparent text or patterns added to documents or images to identify copyright or prevent unauthorized copying.
[0052] It should be noted that removing the watermark from the scanned PDF through a grayscale image can help improve the clarity of the text and the accuracy of OCR recognition, avoid watermark interference in the information extraction process, and make subsequent document parsing more efficient and accurate, thereby improving the content quality of the knowledge base.
[0053] The layout analysis tool is used to identify the text of the scanned PDF corporate document, distinguish the different contents of the text, and obtain the first text.
[0054] Use OCR tools to recognize text in scanned PDF corporate documents to obtain a second text.
[0055] Post-process and splice the tables in the scanned PDF corporate document to obtain the third text in md format.
[0056] The first text, the second text and the third text are combined to obtain a complete text.
[0057] S201 performs document parsing on the text version of the pdf enterprise document, specifically including:
[0058] Use layout parsing tools and multi-column processing tools to extract text and tables from text-based PDF corporate documents.
[0059] Convert the table to md format text.
[0060] Combine the text in md format and the text in the text version of the pdf corporate document to get the complete text.
[0061] S201 parses the docx file enterprise document and the xlsx file enterprise document, specifically including:
[0062] Read the entire content of docx file enterprise documents and xlsx file enterprise documents.
[0063] Convert the table contents of docx and xlsx enterprise documents into md format and combine them with the text part to get the complete text.
[0064] The layout analysis tool is used to identify the text of the scanned PDF corporate document, distinguish the different contents of the text, and obtain the first text.
[0065] Among them, the layout parsing tool is an image processing tool that is used to identify the layout structure of the document layout, separate the text, images, tables and other elements in the document, and distinguish different content areas.
[0066] It should be noted that by using the layout parsing tool to identify the text of the scanned PDF and distinguish the content areas, various types of information can be accurately extracted, ensuring the integrity and hierarchical structure of the text content.
[0067] Use OCR tools to recognize text in scanned PDF corporate documents to obtain a second text.
[0068] Among them, the OCR tool is an optical character recognition tool that recognizes the text in the image and converts it into an editable text format. It is suitable for extracting text from scanned documents or pictures.
[0069] It should be noted that using OCR tools to recognize text in scanned PDFs can efficiently extract text information from image formats. This is particularly suitable for scanned documents without a text layer, ensuring that important information is not missed and providing accurate basic data for subsequent document processing and knowledge base construction.
[0070] Post-process and splice the tables in the scanned PDF corporate document to obtain the third text in md format.
[0071] Among them, md (Markdown) format, a lightweight markup language, uses concise symbols to mark text structures and is suitable for storing and displaying structured data, such as tables and lists.
[0072] The first text, the second text and the third text are combined to obtain a complete text.
[0073] Document parsing of text-based PDF corporate documents, including:
[0074] Use layout parsing tools and multi-column processing tools to extract text and tables from text-based PDF corporate documents.
[0075] Among them, the multi-column processing tool is a tool specifically for processing multi-column typesetting. It is used to identify and extract text content in multi-column formats to ensure that the reading order of multi-column text is correct.
[0076] Convert the table to md format text.
[0077] Combine the text in md format and the text in the text version of the pdf corporate document to get the complete text.
[0078] docx file parsing and xlsx file parsing, including:
[0079] Read the entire contents of docx and xlsx files.
[0080] Convert the table contents of docx and xlsx files into md format and combine them with the text parts to get the complete text.
[0081] In a possible implementation, S201 specifically includes:
[0082] The complete text is segmented into text blocks of different granularities based on document semantics and structure, and vectorized using the fine-tuned m3e-base model.
[0083] Among them, document semantics refers to the meaning or theme of the content in a document. By analyzing the semantics, content with similar themes can be grouped together. Document structure refers to the layout and hierarchy of the document, including content organization methods such as chapters, paragraphs, and titles, which are used to maintain the logical order and integrity of the content. The m3e-base model is a deep learning model for text representation. It converts text into a numerical format that can be used for calculation through vectorization, so as to perform similarity calculation and retrieval.
[0084] It should be noted that dividing the complete text into text blocks of different granularities based on semantics and structure and vectorizing it using the m3e-base model can effectively maintain the logic and relevance of the content, making the knowledge base easier to retrieve and match user queries.
[0085] The specific vectorization using the fine-tuned m3e-base model is as follows:
[0086] V=m3e-base(T)
[0087] Among them, V represents the vector of the text block, m3e-base represents the m3e-base model, and T represents the text block input into the m3e-base model.
[0088] In a possible implementation manner, S203 specifically includes:
[0089] The dependency syntactic tree in the text block is extracted using the LSTM model:
[0090]
[0091] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0092] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0093]
[0094] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0095] h t =o t e tanh(C t )
[0096] Among them, C t represents the cell state at time t, f t represents the state of the forget gate at time t, C t-1 represents the cell state at time t-1, i t represents the input gate state at time t, e represents element-by-element multiplication, represents the candidate cell state, σ represents the Sigmoid activation function, Wf represents the weight matrix of the forget gate, h t-1 represents the hidden state of the legal sentence at time t-1, x t represents the text block input at time t, b f represents the forget gate bias vector, b i represents the input gate bias, b C represents the candidate cell state, b o represents the output gate bias, o t represents the output gate state, tanh represents the hyperbolic tangent function, h t Indicates input x at time t t The hidden state is the grammatical information, where each h t is a connection node of the dependency syntax tree.
[0097] Among them, the LSTM (Long Short-Term Memory) model is a recurrent neural network (RNN) structure that is good at processing sequence data and can capture long-range dependencies in the text. It is suitable for natural language processing tasks. Legal sentence extraction refers to identifying and extracting sentences that conform to specific grammatical structures from the text based on dependencies and syntactic structures, and extracting sentences with legal or rule constraints.
[0098] It should be noted that the use of LSTM model for legal sentence extraction can efficiently capture the context and dependency relationships in sentences, thereby accurately extracting sentences that conform to the rules.
[0099] Extract keywords from the text block using the tf-idf algorithm:
[0100]
[0101]
[0102] Among them, tf(i,j) represents the keyword t in the text block. i In the document d j The frequency of occurrence in h i,j Indicates the keyword t i In the document d j The number of times it appears in Indicates the number of times this occurs in the document, and idf(i) indicates the keyword t i The inverse document frequency of , D represents the total number of documents, {j:t i ∈d j} indicates that it contains the keyword t iSpecifically, the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm is a statistical method commonly used in text analysis. It determines the uniqueness and importance of a word by measuring the frequency of its occurrence in a document and its prevalence in all documents.
[0103] S3, builds an enterprise knowledge base based on the ES library according to the extracted content.
[0104] Among them, the ES (Elasticsearch) library is a distributed data storage system based on a full-text search engine. It has efficient text indexing and retrieval capabilities and is suitable for processing large-scale data searches and analyses. The enterprise knowledge base is a system that stores and manages internal enterprise data and information in a structured manner, making it easier for employees to efficiently query and utilize knowledge.
[0105] S4, receiving user questions about office processes.
[0106] Reference Manual Attached Figure 3 , showing a flow chart of office knowledge question and answer provided by an embodiment of the present invention.
[0107] like Figure 3 , the user makes a question query, the system recognizes the intent, rewrites the question and resolves references to improve the accuracy of understanding. Then, through document segmentation and rewriting, the document content is fine-tuned and embedded, and an index is built for fast retrieval. When generating answers, the large model is called and combined with the prompt words to generate the final answer, providing users with accurate knowledge question and answer services.
[0108] S5, recalls semantic text blocks and keyword text blocks about user questions in the enterprise knowledge base, and uses a large language model to splice the semantic text blocks and keyword text blocks to obtain user question answers.
[0109] Among them, semantic text blocks are text fragments recalled from the enterprise knowledge base that are semantically related to user questions and can help the system better understand the context of the questions. Keyword text blocks are text fragments recalled from the knowledge base based on keywords in user questions. They focus on information containing specific keywords and help locate important content. The big language model is a natural language processing model based on deep learning. It is trained with a large amount of data and has powerful text generation and comprehension capabilities. It is used to intelligently answer user questions.
[0110] It should be noted that the completeness and accuracy of the answers are ensured by recalling semantic text blocks and keyword text blocks from the knowledge base and using a large language model to splice them to generate answers.
[0111] In a possible implementation, S5 specifically includes:
[0112] S501, pre-processing the user question including rewriting and reference disambiguation.
[0113] Among them, rewriting is to restate the questions raised by users to make them more consistent with the expression methods within the knowledge base or system, thereby improving matching accuracy. Reference disambiguation refers to identifying and replacing ambiguous pronouns in user questions with specific referents to ensure that the question content is clear and unambiguous.
[0114] S502, using the cosine similarity algorithm to calculate the semantic similarity between the preprocessed user question and the text block in the enterprise knowledge base:
[0115]
[0116] Among them, cos represents the cosine function, x i represents the i-th user question vector, y i represents the text block vector of the i-th dimension in the enterprise knowledge base, i = 1, 2, ..., n, n represents the total dimension of the user question vector and the text block vector, and θ represents the semantic similarity.
[0117] Among them, the cosine similarity algorithm is an algorithm for measuring the similarity between two vectors. The similarity is determined by calculating the cosine value of the angle between the vectors. Semantic similarity refers to the measurement of the similarity between two texts at the semantic level, which is used to determine whether the two texts express similar meanings.
[0118] It should be noted that using the cosine similarity algorithm to calculate the semantic similarity between user questions and knowledge base text blocks can efficiently identify the most relevant text content, thereby improving the intelligence level of the question-answering system and the accuracy of the answers.
[0119] S503, recalling multiple semantic text blocks in the enterprise knowledge base whose semantic similarity with the preprocessed user question is greater than a preset semantic similarity:
[0120] {C1,C2,...,C m}
[0121] Among them, C j represents the jth semantic text block j=1,2,…,m, where m represents the total number of semantic text blocks.
[0122] S504, using the BM25 algorithm, recall multiple keyword text blocks about the preprocessed user questions in the enterprise knowledge base:
[0123] {B1,B2,...,B s}
[0124]
[0125]
[0126] Among them, B p represents the pth keyword text block, p = 1, 2, ..., s, s represents the total number of keyword text blocks, BM25 represents the BM25 algorithm, D represents the total number of documents, Q represents the query, IDF represents, q i represents the ith keyword, k1 and b represent adjustment parameters, f(q i ,D) indicates keyword q i The number of times it appears in document D, len(D) represents the length of the document, avg len Indicates the average length of the document, df t Represents the number of documents containing keyword t.
[0127] S505: Input the recalled semantic text blocks and keyword text blocks into the bge-large model for fine sorting to obtain multiple final text blocks:
[0128] {D1,D2,...,D k}
[0129] Among them, D q represents the qth final text block, q = 1, 2, …, w, and w represents the total number of final text blocks.
[0130] S506, post-processing the final text block to obtain a plurality of text blocks to be assembled and a similarity score corresponding to each text block to be assembled:
[0131] {F1,F2,...,F p}
[0132] {Score1,Score2,...,Score p}
[0133] Among them, F r Indicates the rth text block to be assembled, Score r Indicates that F r The corresponding similarity score is r=1,2,…,p, where p represents the total number of text blocks to be assembled.
[0134] S507, splicing the text blocks to be assembled in descending order of similarity scores.
[0135] S508, input the spliced text blocks to be assembled and the prompt words into the Qwen2-14B-Instruct large language model to obtain the user question answer.
[0136] It should be noted that inputting the concatenated text blocks and prompt words into the Qwen2-14B-Instruct large language model can understand complex queries and accurately generate answers to user questions.
[0137] In a possible implementation manner, S506 specifically includes:
[0138] S5061, multiple final text blocks belonging to the same document are spliced according to the original text order, and the text in the middle of the final text blocks at both ends is completed to form a complete text block.
[0139] It should be noted that by splicing multiple final text blocks in the same document in the order of the original text and completing the missing parts, the coherence and integrity of the text are ensured, the logical structure of the document is restored more accurately, and the extracted content is more natural and easy to understand in terms of semantics and context.
[0140] S5062: taking the text block with the highest similarity among the complete text blocks as the similarity score of the complete text block, and obtaining a plurality of text blocks to be assembled and a similarity score corresponding to each text block to be assembled.
[0141] In one possible implementation, the Qwen2-14B-Instruct large language model is composed of a stack of Transformer decoders, where the decoder is composed of multi-head attention;
[0142] The calculation method of multi-head attention is:
[0143]
[0144]
[0145] Among them, Z i represents the output of the i-th attention head, X represents the matrix of input data, and W Qi , W Ki and They represent the weight matrices of the query vector, key vector, and value vector, respectively. SelfAttention represents the attention mechanism, softmax represents the activation function, and d k Represents the dimension between vectors, and T represents transpose;
[0146] The splicing method of multi-head attention is:
[0147] Z=concat(Z1,Z2,...,Z k )W o
[0148] Among them, Z represents the final multi-head attention output, and concat represents the concatenation operation W o Represents the weight matrix of the linear transformation, Z i represents the output of the i-th attention head, i = 1, 2, …, k, and k represents the number of attention heads.
[0149] Reference Manual Attached Figure 4 , showing a flowchart of automatic work order flow provided by an embodiment of the present invention.
[0150] like Figure 4 The system determines user needs through intent recognition, connects to the work order interface, extracts the required field information, automatically fills in the work order according to the interface fields and the user conversation content, and determines whether the work order is complete. If it is incomplete, the user is prompted to supplement it manually. If it is complete, the user will review and upload the work order. After the work order is uploaded, it enters the automatic review process. Once the review is passed, the flow is completed, thereby realizing the automated processing and efficient flow of work orders.
[0151] S6, takes user questions and answers as question-answer pairs, and uses a large language model to automatically fill in office process work orders for question-answer pairs according to preset work order filling rules.
[0152] Among them, the work order filling rules are preset work order filling specifications based on the business needs of the enterprise to ensure the accuracy and consistency of the work order content.
[0153] It should be noted that by using user questions and answers as question-answer pairs and using a large language model to automatically fill in work orders according to preset rules, the workload of manual input is reduced and the speed and accuracy of work order generation is improved.
[0154] In a possible implementation manner, S6 specifically includes:
[0155] S601, pre-processing the user question including rewriting and reference disambiguation.
[0156] S602, obtaining interface parameters corresponding to the pre-processed user questions in the enterprise knowledge base.
[0157] Among them, interface parameters refer to parameters specific to software or system interfaces, which are used to define and control interface behaviors, such as the specific format and type of input and output data.
[0158] It should be noted that obtaining interface parameters corresponding to preprocessed user questions can accurately extract relevant information from the enterprise knowledge base, improve the relevance and personalization of work order processing, ensure that the work order content meets the actual needs of users, and thus improve user satisfaction and system practicality.
[0159] S603, combining the interface parameters and the question and answer pair to form a prompt word.
[0160] S604, input the prompt word into the large language model, extract key information, and input the key information into the office process work order through the office process work order interface.
[0161] Among them, the work order interface refers to the interface in the system used to receive, transmit and process work order data, ensuring smooth interaction of information between the work order system and the model.
[0162] S605, automatically fill in the office process work order on the office process work order filling page, and perform manual review to determine whether the work order content is correct. If so, proceed to step S606, otherwise, return to step S601.
[0163] S606, upload the office process work order content.
[0164] S607, combining the preset work order filling rules with the office process work order content to form a prompt word.
[0165] S608, input the prompt word into the large language model to determine whether the content of the office process work order meets the work order filling rules. If so, complete the automatic review of the office process work order, otherwise re-fill the office process work order.
[0166] It should be noted that by inputting prompt words into the large language model to determine whether the work order complies with the filling rules, the compliance check of the work order can be automatically completed to ensure the correctness and consistency of the work order content.
[0167] S7: Output the completed office process work order.
[0168] The beneficial effects of the present invention are as follows:
[0169] In an embodiment of the present invention, by segmenting the document content and extracting key information, the system can quickly build an enterprise knowledge base based on the ES library, convert the information in the enterprise's massive documents into structured and searchable knowledge base resources, effectively mine and analyze document information, and provide a data basis for subsequent intelligent retrieval, thereby improving data management and utilization efficiency. By recalling semantic text blocks and keyword text blocks related to the problem from the knowledge base and using a large language model to generate accurate answers, the system's understanding and response to complex problems are improved, human intervention is reduced, and the accuracy and efficiency of problem handling are improved. By using a large language model for question answering and automatic filling of work orders, users only need to enter natural language to obtain intelligent processing results. The learning cost is low, the operation is convenient, and the user experience and work efficiency are improved. By building a knowledge base, question answering and work order filling are automatically completed, office process automation is realized, and overall office efficiency is improved.
[0170] System Example
[0171] Reference Manual Attached Figure 5 , showing a structural schematic diagram of an intelligent office process processing system based on a large language model provided by an embodiment of the present invention.
[0172] The present invention proposes an intelligent office process processing system 30 based on a large language model, comprising: a memory 303 and a processor 301 .
[0173] The memory 303 stores an application program, and the application program is suitable for being executed by the processor 301 to implement the petroleum equipment fault prediction method based on big data of the method embodiment.
[0174] The oil equipment fault prediction system 30 based on big data includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, through a bus 302.
[0175] The structure of the intelligent office process processing system 30 based on the large language model does not constitute a limitation on the embodiment of the present invention.
[0176] Processor 301 may be a CPU, a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0177] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI bus or an EISA bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0178] The memory 303 can be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0179] Computer Readable Storage Medium Embodiments
[0180] The present invention proposes a computer-readable storage medium having a computer program stored thereon, which can be loaded and executed by a processor to implement the intelligent office process processing method based on a large language model according to the first aspect.
[0181] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.
[0182] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for intelligent office process processing based on a large language model, characterized in that: include: S1, obtain enterprise documents; S2, performing document parsing, document segmentation and key information extraction on the enterprise document in sequence; S3, builds an enterprise knowledge base based on the ES library according to the extracted content; S4, receiving user questions about office processes; S5, recalling semantic text blocks and keyword text blocks related to the user question in the enterprise knowledge base, and splicing the semantic text blocks and the keyword text blocks using a large language model to obtain a user question answer to the user question; S6, taking the user question and the answer to the user question as a question-answer pair, and automatically filling in the office process work order of the question-answer pair using the large language model according to a preset work order filling rule; S7: Output the completed office process work order.
2. The intelligent office process processing method based on a large language model according to claim 1 is characterized in that: The enterprise documents include scanned PDF enterprise documents, text PDF enterprise documents, docx file enterprise documents and xlsx file enterprise documents; The S2 specifically includes: S201, respectively parsing the scanned PDF corporate document, the text-based PDF corporate document, the docx file corporate document and the xlsx file corporate document to obtain complete texts; S202, performing document segmentation including semantic segmentation and structural segmentation on the complete text respectively, and segmenting the complete text into text blocks of different granularities; S203, extracting dependency syntax trees, keywords and named entities in the text block.
3. The intelligent office process processing method based on a large language model according to claim 2 is characterized in that: The document parsing of the scanned PDF enterprise document in S201 specifically includes: Removing the watermark on the scanned PDF corporate document according to the grayscale image; Using a layout analysis tool to identify the text of the scanned PDF corporate document, distinguish different contents of the text, and obtain a first text; Use an OCR tool to recognize the text in the scanned PDF corporate document to obtain a second text; Post-process and splice the tables in the scanned PDF enterprise document to obtain a third text in md format; Combining the first text, the second text and the third text to obtain the complete text; The document parsing of the text version of the pdf enterprise document in S201 specifically includes: Utilizing the layout parsing tool and the multi-column processing tool, extracting the text and tables of the text version of the PDF corporate document; Convert the table into md format text; Combining the md format text and the text of the text version pdf enterprise document to obtain the complete text; The parsing of the docx file enterprise document and the xlsx file enterprise document in S201 specifically includes: Read the entire contents of the docx file enterprise document and the xlsx file enterprise document; The table contents of the docx file enterprise document and the xlsx file enterprise document are converted into md format, and combined with the text parts to obtain the complete text.
4. The intelligent office process processing method based on a large language model according to claim 2 is characterized in that: The S202 specifically includes: The complete text is segmented into text blocks of different granularities based on document semantics and document structure, and vectorized using the fine-tuned m3e-base model; The vectorization using the fine-tuned m3e-base model is specifically as follows: V=m3e-base(T) Among them, V represents the vector of the text block, m3e-base represents the m3e-base model, and T represents the text block input into the m3e-base model.
5. The intelligent office process processing method based on a large language model according to claim 1 is characterized in that: The S203 specifically includes: The dependency syntactic tree in the text block is extracted using the LSTM model: f t =σ(W f ·[h t-1 ,x t ]+b f ) i t =σ(W i ·[h t-1 ,x t ]+b i ) the t =σ(W o ·[h t-1 ,x t ]+b o ) h t =o t e fishy(C) t ) Among them, C t represents the cell state at time t, f t represents the state of the forget gate at time t, C t-1 represents the cell state at time t-1, i t represents the input gate state at time t, e represents element-by-element multiplication, represents the candidate cell state, σ represents the Sigmoid activation function, W f represents the weight matrix of the forget gate, h t-1 represents the hidden state of the legal sentence at time t-1, x t represents the text block input at time t, b f represents the forget gate bias vector, b i represents the input gate bias, b C represents the candidate cell state, b o represents the output gate bias, o t represents the output gate state, tanh represents the hyperbolic tangent function, h t Indicates input x at time t t The hidden state is the grammatical information, where each h t is a connection node of the dependency syntax tree; Extract keywords from the text block using the tf-idf algorithm: Among them, tf(i,j) represents the keyword t in the text block. i In the document d j The frequency of occurrence in h i,j Indicates the keyword t i In the document d j The number of times it appears in Indicates the number of times this occurs in the document, and idf(i) indicates the keyword t i The inverse document frequency of , D represents the total number of documents, {j:t i ∈d j } indicates that it contains the keyword t i The number of documents.
6. The intelligent office process processing method based on a large language model according to claim 1 is characterized in that: The S5 specifically includes: S501, performing preprocessing including rewriting and reference disambiguation on the user question; S502, using a cosine similarity algorithm to calculate the semantic similarity between the preprocessed user question and the text block in the enterprise knowledge base: Among them, cos represents the cosine function, x i represents the i-th user question vector, y i represents the text block vector of the i-th dimension in the enterprise knowledge base, i = 1, 2, ..., n, n represents the total dimension of the user question vector and the text block vector, and θ represents the semantic similarity; S503, recalling from the enterprise knowledge base a plurality of semantic text blocks whose semantic similarity with the preprocessed user question is greater than a preset semantic similarity: {C1,C2,...,C m } Among them, C j represents the jth semantic text block, j = 1, 2, ..., m, and m represents the total number of semantic text blocks; S504, using the BM25 algorithm, recalling multiple keyword text blocks related to the preprocessed user questions in the enterprise knowledge base: <h2 style=";text-align:left;direction:ltr">{B1,B2,...,B<h2 style=";text-align:left;direction:ltr"> s <h2 style=";text-align:left;direction:ltr">} Among them, B p represents the pth keyword text block, p = 1, 2, ..., s, s represents the total number of keyword text blocks, BM25 represents the BM25 algorithm, D represents the total number of documents, Q represents the query, IDF represents, q i represents the ith keyword, k1 and b represent adjustment parameters, f(q i ,D) indicates keyword q i The number of times it appears in document D, len(D) represents the length of the document, avg len Indicates the average length of the document, df t Indicates the number of documents containing keyword t; S505: Input the recalled semantic text blocks and keyword text blocks into the bge-large model for fine sorting to obtain multiple final text blocks: {D1,D2,...,D w } Among them, D q represents the qth final text block, q = 1, 2, …, w, and w represents the total number of final text blocks. S506, post-processing the final text block to obtain a plurality of text blocks to be assembled and a similarity score corresponding to each text block to be assembled: {F1,F2,...,F p } {Score1,Score2,...,Score p } Among them, F r Indicates the rth text block to be assembled, Score r Indicates that F r The corresponding similarity score is r = 1, 2, ..., p, where p represents the total number of text blocks to be assembled; S507, splicing the text blocks to be assembled in descending order of similarity scores; S508, input the spliced text blocks to be assembled and the prompt words into the Qwen2-14B-Instruct large language model to obtain the user question answer of the user question.
7. The intelligent office process processing method based on a large language model according to claim 6 is characterized in that: The S506 specifically includes: S5061, multiple final text blocks belonging to the same document are spliced according to the original text order, and the text between the final text blocks at both ends is completed to form a complete text block; S5062: taking the text block with the highest similarity among the complete text blocks as the similarity score of the complete text block, and obtaining a plurality of text blocks to be assembled and a similarity score corresponding to each text block to be assembled.
8. The intelligent office process processing method based on a large language model according to claim 6 is characterized in that: The Qwen2-14B-Instruct large language model is composed of a stack of Transformer decoders, wherein the decoder is composed of multi-head attention; The calculation method of the multi-head attention is: Among them, Z i represents the output of the i-th attention head, X represents the matrix of input data, W Ki and They represent the weight matrices of the query vector, key vector, and value vector, respectively. SelfAttention represents the attention mechanism, softmax represents the activation function, and d k represents the dimension between vectors, T represents transpose; The splicing method of the multi-head attention is: Z=concat(Z1,Z2,...,Z k )IN o Among them, Z represents the final multi-head attention output, and concat represents the concatenation operation W o Represents the weight matrix of the linear transformation, Z i represents the output of the i-th attention head, i = 1, 2, …, k, and k represents the number of attention heads.
9. The intelligent office process processing based on a large language model according to claim 1 is characterized in that: The S6 specifically includes: S601, performing preprocessing including rewriting and reference disambiguation on the user question; S602, obtaining interface parameters corresponding to the pre-processed user questions in the enterprise knowledge base; S603, combining the interface parameter and the question-answer pair to form a prompt word; S604, inputting the prompt word into a large language model, extracting key information, and inputting the key information into the office process work order through an office process work order interface; S605, automatically filling in the office process work order on the office process work order filling page, and manually reviewing to determine whether the work order content is correct. If so, proceed to step S606, otherwise, return to step S601; S606, upload the office process work order content; S607, combining the preset work order filling rules and the office process work order content to form a prompt word; S608, input the prompt word into the large language model to determine whether the content of the office process work order meets the work order filling rules. If so, complete the automatic review of the office process work order, otherwise re-fill the office process work order.
10. An intelligent office process processing system based on a large language model, characterized in that: include: Memory and processor; An application is stored in the memory, and the application is suitable for being executed by the processor to implement the intelligent office process processing method based on a large language model as described in any one of claims 1 to 9.
Citation Information
Cited By
Clinical test document quality detection and processing method and system, and computer equipment
CN120257941A
Enterprise process automation agent generation method and system
CN121615769A