Intelligent office plug-in system and office method based on privately deployed large language model

By deploying a large language model-based intelligent office plugin system on a private basis, the system solves the problems of insufficient adaptation to new users, model flexibility, security, and interactive experience in existing intelligent office systems. It achieves efficient, secure, and professional office assistance services, adapts to multiple document types, and ensures data confidentiality.

CN121764552APending Publication Date: 2026-03-31CHINA THREE GORGES CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing intelligent office systems suffer from several problems, including insufficient adaptation to new users or limited data, inflexible model updates and adjustments, a lack of professionalism and contextual consistency in generated results, inadequate system scalability and security, and poor user interaction experience.

Method used

The intelligent office plugin system, which adopts a private deployment of a large language model, loads the large language model on an intranet server and combines it with a communication proxy module and an intelligent office plugin module to achieve secure communication and data processing. It also uses LoRA fine-tuning technology or INT4/INT8 quantization strategy to simplify and optimize the model, configures vLLM or Triton Inference Server inference framework, supports multi-instance deployment and load balancing, and integrates the Handlebars Prompt template engine and local knowledge enhancement module to perform document operations and inference request processing.

Benefits of technology

It enables the efficient and secure provision of intelligent office assistance services in the enterprise intranet environment, improves the professionalism and contextual consistency of generated content, enhances the scalability and security of the system, improves the user interaction experience, and reduces hardware costs and computing resource requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764552A_ABST
    Figure CN121764552A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent office plug-in system and office method based on a privately deployed large language model, and a privately deployed model service module is deployed in an intranet server and is used for loading the large language model and establishing a reasoning service environment; the communication agent module is connected between the intranet and the terminal and is used for establishing a secure communication channel and forwarding the reasoning request; the intelligent office plug-in module is integrated in WPS office software and establishes operation binding with a current document through a document operation API; the intelligent office plug-in module captures a document context and a user intention through a document operation API, generates request data and sends the request data to the privatization model service module through the communication agent module; and the privatization model service module performs reasoning calculation on the request data, and generated response data is returned by the communication agent module, analyzed by the intelligent office plug-in module and backfilled into the WPS document. Confidentiality of user data and business data is guaranteed, and model simplification and quantification processing are combined to adapt to an office terminal operation environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent office plugins, and in particular to an intelligent office plugin system and office method based on a privately deployed large language model. Background Technology

[0002] With the deep application of artificial intelligence technology in the office field, various intelligent office systems are emerging, but there are still many areas that need improvement.

[0003] In the prior art, an AI-driven multilingual intelligent document summarization and mind map generation system (CN119494394B) receives multimodal document data such as text, images, tables, and video subtitles through a multimodal semantic feature generation module, extracts and fuses semantic features to generate unified data, and then a semantic graph construction module extracts causal relationships based on a Bayesian network model and conditional independence test, combines cross-modal relationship graph network to calibrate multimodal relationships, and constructs a dynamically optimized causal semantic graph. Finally, the summarization generation module generates multilingual summaries using a dynamic semantic flow modeling method, and the mind map generation and optimization module generates the final mind map through hierarchical relationship optimization, user interaction adjustment, and generative adversarial network optimization. While the system can handle multimodal documents, multimodal data processing relies on specific processing units such as text, images, tables, and video subtitles, resulting in poor scalability when faced with complex data types or new data formats. During the construction of the causal semantic graph, the Bayesian network model and conditional independence test have high computational complexity when handling large-scale data or complex semantic relationships, which may lead to inaccurate causal relationship extraction. The complex models used for summary generation and mind map generation, such as dynamic semantic flow modeling and recurrent neural graph networks, require a lot of time and data for training and optimization. Moreover, the black-box nature of the models makes the generated results difficult to interpret and evaluate. The lack of clear standards for consistency verification and hierarchical relationship optimization leads to fluctuations in the quality and logic of the generated content.

[0004] Another intelligent office assistant system based on natural language processing (CN119721970A) collects user query keywords, frequency, timestamps and other behavioral data through a behavior data collection module to generate user behavior feature vectors. The user intent analysis module generates user intent vectors based on these vectors using natural language technology. The rule matching module calculates the similarity between the intent vector and the vector of rules and regulations. The recommendation generation module combines the above results to generate a personalized recommendation list. The push strategy execution module decides whether to push based on a preset threshold. The feedback optimization module adjusts the push threshold based on user operation records. While the system has shown some effectiveness in accurately pushing rules and regulations and providing personalized recommendations, it relies on a large amount of user query behavior data to construct feature vectors and intent vectors. When facing new users or situations with limited data, the accuracy of intent analysis is insufficient. The system uses BGE and M3E models for intent classification modeling, and model training and updates consume a lot of computing resources and time, making it difficult to quickly adapt to changes in rules and regulations. The rule matching and recommendation generation process is mainly based on similarity calculation and comprehensive scoring, which makes it difficult to provide accurate recommendations for complex business scenarios or ambiguous user needs. Furthermore, the matching and recommendation process lacks interpretability, and users cannot understand the basis for the recommendation results. The feedback optimization module only optimizes the service by adjusting the push execution threshold, which is a single adjustment method and cannot fully consider changes in users' real needs and usage habits.

[0005] In addition, traditional office methods have significant shortcomings in rapidly responding to complex office needs, providing personalized assistance, and dynamically adapting to knowledge updates. The limitations of the two existing related systems further highlight the urgent need in the field of smart office for more efficient, flexible, accurate, and secure solutions. Summary of the Invention

[0006] The main objective of this invention is to provide an intelligent office plugin system and office method based on a privately deployed large language model, which solves the problems of insufficient adaptation to new users or small amounts of data, inflexible model updates and adjustments, lack of professionalism and contextual consistency in generated results, insufficient system scalability and security, and poor user interaction experience in existing intelligent office systems.

[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: an intelligent office plug-in system based on a privately deployed large language model, the system including a private model service module deployed on an intranet server, used to load the large language model and establish an inference service environment; The communication proxy module connects the intranet and the terminal, and is used to establish a secure communication channel and forward inference requests; The intelligent office plugin module is integrated into WPS Office software and establishes an operation binding with the current document through the document operation API; The intelligent office plugin module captures document context and user intent through the document operation API, generates request data, and sends it to the private model service module via the communication proxy module. The private model service module performs inference calculations on the request data, and the generated response data is returned by the communication proxy module. The intelligent office plugin module then parses the response data and populates it back into the WPS document.

[0008] In the preferred scheme, the large language model loaded by the private model service module is optimized by using LoRA fine-tuning technology or INT4 / INT8 quantization strategy; Configure the inference service environment with vLLM or Triton Inference Server inference framework, expose the inference service to the outside world through RESTful or gRPC API interface, and set up access control mechanism of JWT token authentication or IP whitelist. Use multi-instance deployment combined with Nginx or FastAPI load balancing strategy to support concurrent calls from multiple terminals.

[0009] In the preferred solution, the intelligent office plugin module is developed using JavaScript / TypeScript + HTML5, and is compatible with PC, mobile and web WPS environments. The plugin module adopts a modular architecture, integrates the Handlebars lightweight Prompt template engine, configures event listeners and hook functions to realize real-time response to document editing, and has a built-in format adapter to handle the format of inference results. The document manipulation API includes interfaces for reading full text, retrieving selected text, and inserting content, and supports interactive compatibility with multiple document types such as Word, Excel, and presentations.

[0010] The preferred solution also includes a local knowledge enhancement module, which supports loading local enterprise documents in Word, PDF, and Excel formats. After document segmentation and content cleaning, the documents are vectorized and encoded using the Sentence-BERT model. A vector retrieval index is built using FAISS, and a structured information enhancement mechanism is constructed in conjunction with a knowledge graph. When the intelligent office plugin module generates request data, it matches k relevant text segments from the vector index through semantic retrieval as extended context, and embeds them into the request data to form a RAG enhanced inference request.

[0011] A smart office method based on privately deployed large language models includes: S1. Utilize the private model service module to build an intranet inference environment, optimize parameters and deploy services for the large language model; S2. Capture user document operation behavior and context content in WPS through the intelligent office plugin module; S3. Use the Prompt engine unit to construct structured prompts and send the requests to the server through the communication proxy module; S4, the private model service module performs inference calculations on the request and generates the response content; S5, the intelligent office plugin module receives the response content, adapts the format, and then performs document updates through the document operation API.

[0012] In the preferred embodiment, step S1 specifically includes: Install containerization management tools, GPU drivers, CUDA acceleration libraries, and Python runtime environment on the intranet server, and configure PyTorch dependency components; Obtain a private deployment image or source code package of a large language model, and adjust the model parameters using LoRA fine-tuning technology or INT4 / INT8 quantization strategy; Deploy the vLLM or Triton Inference Server inference framework, configure RESTful or gRPC API interfaces, and set up JWT Token authentication or IP whitelist access control; Service deployment is completed by using a multi-instance model deployment combined with a load balancing strategy.

[0013] In the preferred embodiment, step S2 specifically includes: The intelligent office plugin module captures user document operation behavior through event listeners and hook functions; Calling WPS's native document manipulation API, including: wps.WpsApplication ().ActiveDocument.Content.Text, wps.Application.Selection.Text; Get the document context content; For different document types such as Word, Excel, and presentations, switch to the corresponding API strategy to process rich text content.

[0014] In the preferred embodiment, step S3, constructing structured prompts, specifically includes: Based on the Handlebars lightweight Prompt template engine, prompts are constructed according to a four-part structure of "role setting + task instructions + input text + output format instructions"; For complex office tasks, automatically add 1-3 sample examples that fit the actual scenario; Combine the context of the user document to form a complete structured prompt request.

[0015] In the preferred embodiment, sending the request through the communication proxy module in step S3 specifically includes: Configure a local HTTP proxy or intranet leased line as a secure communication channel for the communication proxy module; The request data structure is defined using the RESTful protocol, and the request body is explicitly defined to include text content and task type fields. An error code mechanism is established so that the intelligent office plugin module returns a prompt message when the private model service module malfunctions.

[0016] In the preferred scheme, step S4, which involves performing reasoning calculations in conjunction with the local knowledge base enhancement module, specifically includes: Extract keywords from structured prompts and apply cosine similarity algorithm. Retrieve from the vector index, where q is the user request vector and d is the knowledge base text vector; Obtain the k most relevant text segments and embed them as extended context into structured prompt words; Text vectors are generated using the formula Implementation, in which This is the encoding function for the Sentence-BERT model.

[0017] The preferred solution also includes a local knowledge base maintenance step: Establish a regular incremental update process and use text comparison algorithms to identify newly added, modified, and deleted parts of local documents; The changed content was re-cleaned and vectorized, and the vector index and knowledge graph were updated. A "latest first" strategy is used to handle document version conflicts and historical version records are retained.

[0018] In the preferred embodiment, step S5 specifically includes: The intelligent office plugin module processes the response content using a built-in format adapter to match the format requirements of the current document type; Highlight the differences between the response content and the original text, and support users to confirm, modify or roll back paragraph by paragraph; The plugin caches user interaction history locally and automatically appends it to the Prompt context during subsequent requests.

[0019] The preferred solution also includes a Prompt dynamic fine-tuning step: Record user feedback data for each inference request, including usage frequency f and result acceptance rate R; Through the scoring function Assess the quality of the prompt, including , These are the weighting coefficients; Based on the evaluation results, iteratively optimize the presentation, task instructions, or example content of the Prompt.

[0020] The preferred solution also includes operation monitoring and resource management steps: Deploy a monitoring module to record metrics such as API call response time, vector library hit rate, and model response quality; Through response efficiency index function Statistical service data is collected and reports are generated regularly. Set model call quotas, adopt canary release and A / B testing mechanisms, and release the new version to the full population after verifying its features.

[0021] The preferred solution also includes data security and compliance steps: The communication proxy module uses HTTPS or a local encrypted channel to transmit data; When calling the private model service module, the JWT identity token is verified, and the calling permission scope of different users is controlled through a multi-level permission system; The transmission log only retains the interface call status, execution time, and performance metrics, and does not record the document text or sensitive business data.

[0022] This invention provides an intelligent office plugin system and method based on a privately deployed large language model. This application ensures the confidentiality of user and business data through the private deployment of the large language model, and adapts to the office terminal operating environment by combining model simplification and quantification. A modular plugin architecture is built based on the WPS open platform, achieving seamless connection and multi-terminal adaptation with various document components. Native API binding and event listening mechanisms ensure consistent interaction and real-time response. It provides multi-functional modules such as intelligent polishing, document generation, and contract review, employing a structured Prompt design and dynamic fine-tuning mechanism to improve the relevance of content generation. A local knowledge base is integrated, and through vectorized encoding, semantic retrieval, and RAG enhancement mechanisms, combined with knowledge graph-assisted semantic understanding, it improves the professionalism and contextual consistency of output. A multi-level permission system, encrypted transmission strategy, log auditing, and anomaly detection functions are configured to ensure data compliance and security. Multi-turn dialogue, highlighted backfilling, operation monitoring, resource quotas, and canary release mechanisms optimize user experience and system stability. Attached Figure Description

[0023] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a block diagram of the intelligent office plug-in system of the present invention; Figure 2 This is a flowchart of the office method of the intelligent office plug-in system of the present invention. Detailed Implementation

[0024] Example 1 like Figure 1-2 As shown, an intelligent office plug-in system based on a privately deployed large language model is described. The system includes a private model service module, which is deployed on an intranet server and is used to load the large language model and establish an inference service environment. The communication proxy module connects the intranet and the terminal, and is used to establish a secure communication channel and forward inference requests; The intelligent office plugin module is integrated into WPS Office software and establishes an operation binding with the current document through the document operation API; The intelligent office plugin module captures document context and user intent through the document operation API, generates request data, and sends it to the private model service module via the communication proxy module. The private model service module performs inference calculations on the request data, and the generated response data is returned by the communication proxy module. The intelligent office plugin module then parses the response data and populates it back into the WPS document.

[0025] The private model service module is deployed on the enterprise's intranet server. Its core function is to load large language models and build a stable inference service environment, ensuring that model calculations and data processing are completed within the enterprise intranet, physically isolating external networks from the risk of data access. The communication proxy module acts as a bridge between the intranet and the terminal. Its core function is to build a secure and low-latency communication channel, enabling reliable forwarding of inference request and response data and ensuring that data transmission is not intercepted or tampered with. The intelligent office plugin module is deeply integrated into WPS Office software. By calling WPS's native document operation API, it establishes a tight operation binding with the currently opened document, accurately capturing the contextual content of the document and the user's operational intent, such as selected text paragraphs and triggered function commands. The interaction flow of each module is clear and orderly. The intelligent office plugin module organizes the captured information into standardized request data, which is transmitted to the private model service module via the communication proxy module. The latter performs inference calculations on the request data, generates response content, and then returns it to the intelligent office plugin module via the communication proxy module. Finally, the plugin module parses the response content into content conforming to the document format and populates it back into the WPS document, forming a complete closed loop for office assistance.

[0026] In the preferred scheme, the large language model loaded by the private model service module is optimized by using LoRA fine-tuning technology or INT4 / INT8 quantization strategy; Configure the inference service environment with vLLM or Triton Inference Server inference framework, expose the inference service to the outside world through RESTful or gRPC API interface, and set up access control mechanism of JWT token authentication or IP whitelist. Use multi-instance deployment combined with Nginx or FastAPI load balancing strategy to support concurrent calls from multiple terminals.

[0027] The language model is optimized using LoRA fine-tuning or INT4 / INT8 quantization strategies. LoRA fine-tuning freezes most of the model's parameters and trains only a few newly added parameters, adapting to the specific needs of office scenarios without sacrificing model performance. INT4 / INT8 quantization significantly reduces the model's memory footprint by lowering the precision of its parameters. Both techniques effectively reduce computational overhead, allowing the model to run efficiently on ordinary office servers. The inference service environment is configured with either vLLM or Triton Inference Server, both mature high-concurrency, low-latency inference engines that can meet the high-frequency, short-response-time call requirements of office scenarios. The RESTful or gRPC API interfaces exposed for external inference services are standardized communication interface specifications, facilitating quick access and invocation of the inference service by intelligent office plugin modules. The access control mechanism employs either JWT Token authentication or an IP whitelist. JWT Token authentication assigns a unique identity token to each legitimate user, ensuring the traceability and legitimacy of the initiator of each API call. The IP whitelist only allows terminals within a specified range on the enterprise intranet to access the inference service, providing dual protection to effectively prevent unauthorized access. Multi-instance deployment combined with Nginx or FastAPI load balancing strategies involves deploying model instances on multiple servers. The load balancing component distributes user requests appropriately across different instances, avoiding overload on a single server and ensuring system stability and availability when multiple terminals call simultaneously.

[0028] In the preferred solution, the intelligent office plugin module is developed using JavaScript / TypeScript + HTML5, and is compatible with PC, mobile and web WPS environments. The plugin module adopts a modular architecture, integrates the Handlebars lightweight Prompt template engine, configures event listeners and hook functions to realize real-time response to document editing, and has a built-in format adapter to handle the format of inference results. The document manipulation API includes interfaces for reading full text, retrieving selected text, and inserting content, and supports interactive compatibility with multiple document types such as Word, Excel, and presentations.

[0029] Utilizing a JavaScript / TypeScript + HTML5 development stack, the plugin achieves cross-platform compatibility, ensuring it functions correctly on PC, mobile, and web versions of WPS, maintaining a consistent user interface and experience. Its modular architecture breaks down different office functions into independent units, allowing users to select and call functions according to their needs, simplifying the workflow and facilitating future feature expansion and maintenance. The integrated Handlebars lightweight Prompt template engine quickly combines user-inputted text with preset function commands into structured prompts, ensuring the large language model accurately understands the user's office needs. Configured event listeners and hook functions capture real-time changes in document editing status, such as text selection and document saving. Once the user triggers a related operation, the hook function immediately initiates the corresponding processing flow, achieving real-time response and dynamic collaboration between the large language model and the document editing process. The built-in format adapter's core function is to convert the raw text output by the large language model into a format that matches the current WPS document type, such as paragraph formatting in Word documents or cell formatting in Excel documents, preventing document layout errors caused by inserted content. The document operation API covers functions such as reading full text, retrieving selected text, and inserting content, comprehensively meeting the plugin's interaction needs with different types of WPS documents. Whether it's word processing in Word documents, data editing in Excel documents, or content modification in presentations, seamless compatibility is achieved.

[0030] The preferred solution also includes a local knowledge enhancement module, which supports loading local enterprise documents in Word, PDF, and Excel formats. After document segmentation and content cleaning, the documents are vectorized and encoded using the Sentence-BERT model. A vector retrieval index is built using FAISS, and a structured information enhancement mechanism is constructed in conjunction with a knowledge graph. When the intelligent office plugin module generates request data, it matches k relevant text segments from the vector index through semantic retrieval as extended context, and embeds them into the request data to form a RAG enhanced inference request.

[0031] This module supports loading commonly used local documents in Word, PDF, and Excel formats. These documents can include core knowledge materials such as internal rules and regulations, past office templates, and historical business documents. The document processing workflow first involves segmentation, breaking long documents down into shorter text fragments according to chapters and paragraphs. Then, content cleaning is performed to remove whitespace, redundant formatting marks, duplicate information, and other irrelevant content, ensuring text quality. Text vectorization encoding uses the Sentence-BERT model, which transforms the cleaned text fragments into fixed-dimensional semantic vectors. These vectors accurately capture the core semantic information of the text, enabling computers to quantify and compare the semantic relationships between different texts. Using FAISS to build a vector retrieval index significantly improves the speed of semantic retrieval, ensuring that content relevant to user needs is quickly found among massive amounts of document fragments. The knowledge graph construction extracts entity information and the relationships between entities from the text, such as the correspondence between department names and business processes, and the constraints between legal clauses and compliance requirements, forming a structured knowledge network to help the model more accurately understand business logic. When the intelligent office plugin module generates request data, it matches k relevant text segments from the vector index through semantic retrieval. This semantic retrieval is based on the cosine similarity algorithm, which measures the degree of relevance by calculating the cosine value of the angle between the user request vector and the text vector in the knowledge base. The larger the value, the closer the semantic association. The selected k text segments are embedded as extended context into the request data to form RAG enhanced inference request, which allows the model to combine enterprise-specific knowledge during the inference process to generate more professional and context-consistent results.

[0032] This system achieves several significant benefits through the aforementioned technical solutions. The combination of a private deployment model and multiple security control mechanisms ensures that enterprise office data flows entirely within the intranet, effectively protecting the confidentiality of user and business data and mitigating the risk of data leakage. Model simplification and optimization technology reduces computing power overhead, enabling the large language model to adapt to the operating environment of ordinary office servers, thus lowering the hardware costs of system deployment. Deep integration of the plug-in module with WPS Office software and its multi-terminal adaptability allow users to enjoy intelligent auxiliary services without switching office tools, significantly improving ease of use. The modular architecture and structured Prompt design enable the system to support various office scenarios such as intelligent polishing, document rewriting, and contract review, meeting diverse user needs for office assistance. The local knowledge enhancement module deeply integrates enterprise-specific knowledge with the large language model through RAG technology, significantly improving the professionalism and relevance of the model's output content, especially suitable for highly specialized document processing scenarios such as internal enterprise notices, regulations, and summary reports. Multi-instance deployment and load balancing strategies ensure high availability and concurrent processing capabilities of the system, while technical details such as event listening and format adaptation optimize the user interaction experience, significantly improving overall office efficiency and document quality. At the same time, a robust permission management and operation monitoring mechanism ensures the compliance and stability of the system operation, giving it broad promotional value and industrialization prospects.

[0033] The key technical logic and formulas involved are clear and easy to understand. The core of the text vectorization process is to transform text into semantic vectors through the Sentence-BERT model. Essentially, this process maps the semantic information of the text into a numerical form that can be processed by a computer, making semantically similar texts correspond to vectors that are close in distance in the vector space. The cosine similarity algorithm used in semantic retrieval works by calculating the ratio of the dot product of two vectors to the product of their magnitudes, obtaining a numerical measure of vector similarity. This value ranges from -1 to 1; the closer it is to 1, the stronger the semantic connection between the two vectors. The Prompt quality scoring function quantifies the adaptability of the Prompt template through a weighted calculation of user usage frequency and result acceptance rate. The weighting coefficients are adjusted according to the actual needs of the office scenario, making the scoring results more aligned with user habits and providing an objective basis for the iterative optimization of the Prompt template.

[0034] Example 2 Further explanation in conjunction with Example 1, such as Figure 1-2 As shown, an intelligent office method based on privately deployed large language models includes: S1. Utilize the private model service module to build an intranet inference environment, optimize parameters and deploy services for the large language model; S2. Capture user document operation behavior and context content in WPS through the intelligent office plugin module; S3. Use the Prompt engine unit to construct structured prompts and send the requests to the server through the communication proxy module; S4, the private model service module performs inference calculations on the request and generates the response content; S5, the intelligent office plugin module receives the response content, adapts the format, and then performs document updates through the document operation API.

[0035] S1 is the foundational preparation stage, which involves building an intranet inference environment and deploying the model to provide computing power support for subsequent office assistance. S2 accurately captures user needs and document information, which is crucial for connecting user operations with system services. S3 transforms the captured information into structured requests that the model can understand, ensuring the accuracy of the inference direction. S4 is the core inference stage, generating targeted response content through the computation of the private model. S5 completes the format adaptation of the response content and document backfilling, directly serving the user's office needs. The entire process, from environment setup to final document update, covers the entire chain of intelligent office, with reasonable step divisions and clear operational logic, ensuring that the system can provide office assistance services in an orderly and efficient manner.

[0036] In the preferred embodiment, step S1 specifically includes: Install containerization management tools, GPU drivers, CUDA acceleration libraries, and Python runtime environment on the intranet server, and configure PyTorch dependency components; Obtain a private deployment image or source code package of a large language model, and adjust the model parameters using LoRA fine-tuning technology or INT4 / INT8 quantization strategy; Deploy the vLLM or Triton Inference Server inference framework, configure RESTful or gRPC API interfaces, and set up JWT Token authentication or IP whitelist access control; Service deployment is completed by using a multi-instance model deployment combined with a load balancing strategy.

[0037] Setting up an intranet server environment requires installing containerization management tools, GPU drivers, CUDA acceleration libraries, and a Python runtime environment, as well as configuring PyTorch dependencies. These components together form the basic environment for model operation, ensuring that hardware resources can be effectively utilized. After obtaining a private deployment image or source code package of the large language model, adjust the model parameters using LoRA fine-tuning technology or INT4 / INT8 quantization strategies. LoRA fine-tuning adapts to office scenarios by training a small number of newly added parameters, while INT4 / INT8 quantization strategies reduce parameter precision to reduce GPU memory usage. Both methods can improve running efficiency while ensuring model performance. Deploy a vLLM or Triton Inference Server inference framework, configure RESTful or gRPC API interfaces to provide a standardized communication channel for plugin calls, and set up JWT Token authentication or IP whitelist access control to ensure the security of the inference service from both authentication and terminal permission perspectives. The service deployment is completed by using a multi-instance model combined with a load balancing strategy. By distributing the request pressure across multiple servers, the system's stable operation is ensured when multiple users make concurrent calls. These technical details are all described in detail in the "Environment Construction and Data Preparation" section of the manual, and technical personnel can follow the steps to implement them.

[0038] In the preferred embodiment, step S2 specifically includes: The intelligent office plugin module captures user document operation behavior through event listeners and hook functions; Calling WPS's native document manipulation API, including: wps.WpsApplication ().ActiveDocument.Content.Text, wps.Application.Selection.Text; Get the document context content; For different document types such as Word, Excel, and presentations, switch to the corresponding API strategy to process rich text content.

[0039] The intelligent office plugin module captures user document operation behaviors through event listeners and hook functions, enabling real-time detection of user actions such as text selection and function triggering, ensuring timely system response to user needs. It calls WPS's native document operation APIs to obtain document context content; different APIs correspond to different information retrieval needs, comprehensively covering document content extraction scenarios. It switches corresponding API strategies for different document types such as Word, Excel, and presentations, preserving original formatting information when processing rich text content to avoid layout errors caused by subsequent content insertion. These adaptive designs ensure the plugin is compatible with various office scenarios. The "Large Model Plugin Development and Interface Integration" section of the manual provides detailed explanations of API calls and document type adaptation, providing ample support for this claim.

[0040] In the preferred embodiment, step S3, constructing structured prompts, specifically includes: Based on the Handlebars lightweight Prompt template engine, prompts are constructed according to a four-part structure of "role setting + task instructions + input text + output format instructions"; For complex office tasks, automatically add 1-3 sample examples that fit the actual scenario; Combine the context of the user document to form a complete structured prompt request.

[0041] Leveraging the Handlebars lightweight Prompt template engine, prompts are constructed using a four-part structure: "role setting + task instruction + input text + output format specification." This structured design allows the model to clearly understand user needs, task requirements, and output specifications, improving the accuracy of the response. For complex office tasks, 1-3 sample examples closely related to real-world scenarios are automatically added, guiding the model to master task processing logic through concrete examples and reducing deviations in generated content. The user document's context is pieced together to form a complete structured prompt request, enabling the model to generate responses within the overall document context and avoiding incoherent content due to detachment from context. The "Functional Module Design and Prompt Strategy" section of the specification details the Prompt's structural design, example addition, and context splicing methods, fully supporting the technical features of this claim.

[0042] In the preferred embodiment, sending the request through the communication proxy module in step S3 specifically includes: Configure a local HTTP proxy or intranet leased line as a secure communication channel for the communication proxy module; The request data structure is defined using the RESTful protocol, and the request body is explicitly defined to include text content and task type fields. An error code mechanism is established so that the intelligent office plugin module returns a prompt message when the private model service module malfunctions.

[0043] Configure a local HTTP proxy or intranet dedicated line as a secure communication channel. Both methods ensure that request data is transmitted within the enterprise intranet, avoiding the security risks associated with public network transmission. RESTful protocol is used to define the request data structure, clearly defining the core fields included in the request body. This ensures consistent communication standards between the plugin and the inference service, reducing the risk of parsing errors during data transmission. An error code mechanism is established. When the private model service module malfunctions, the intelligent office plugin module returns a prompt message, helping users quickly understand the problem type and improving the user experience. The "Model Service Interface Call and Plugin Communication" section of the manual provides detailed descriptions of communication channel configuration, protocol definition, and error handling, ensuring the feasibility of the technical solution.

[0044] In the preferred scheme, step S4, which involves performing reasoning calculations in conjunction with the local knowledge base enhancement module, specifically includes: Extract keywords from structured prompts and apply cosine similarity algorithm. Retrieve from the vector index, where q is the user request vector and d is the knowledge base text vector; Obtain the k most relevant text segments and embed them as extended context into structured prompt words; Text vectors are generated using the formula Implementation, in which This is the encoding function for the Sentence-BERT model.

[0045] The process of enhancing reasoning computation by combining local knowledge base in S4 has been refined. After extracting keywords from structured prompts, the cosine similarity algorithm is used. Retrieve from the vector index. In this formula, q represents the user request vector, d represents the knowledge base text vector, the numerator is the dot product of the two vectors, and the denominator is the product of the magnitudes of the two vectors. The calculated result ranges from -1 to 1. The closer the value is to 1, the stronger the semantic relevance between the user request and the knowledge base text. This algorithm can quickly filter out the text fragments most relevant to the current task. The text vector is generated using the formula... Implementation, in which The encoding function of the Sentence-BERT model represents the text content to be encoded. This formula transforms the text into a computer-processable semantic vector, ensuring that semantically similar texts are matched with vectors that are close in distance within the vector space, thus providing a foundation for subsequent similarity retrieval. The model embeds structured prompts into the k most relevant text segments, enabling it to combine local enterprise knowledge to generate responses, improving the professionalism and contextual consistency of the content. The "Local Knowledge Integration and Writing Enhancement" section of the specification provides detailed explanations of the retrieval algorithm, vector generation, and contextual embedding, ensuring the reproducibility of the technical solution.

[0046] The preferred solution also includes a local knowledge base maintenance step: Establish a regular incremental update process and use text comparison algorithms to identify newly added, modified, and deleted parts of local documents; The changed content was re-cleaned and vectorized, and the vector index and knowledge graph were updated. A "latest first" strategy is used to handle document version conflicts and historical version records are retained.

[0047] A regular incremental update process is established, using text comparison algorithms to identify newly added, modified, and deleted portions of local documents, enabling targeted knowledge base updates and avoiding the resource waste of full updates. Changed content undergoes text cleaning and vectorization encoding, and the vector index library and knowledge graph are updated to ensure the information in the knowledge base remains consistent with the latest business situation. A "latest-first" strategy is adopted to handle document version conflicts, retaining historical version records. This ensures both the timeliness of knowledge and the possibility of subsequent traceability. The "Knowledge Base Maintenance and Update Mechanism" section of the specification provides a detailed description of the update process and conflict handling, supporting the technical features of this claim.

[0048] In the preferred embodiment, step S5 specifically includes: The intelligent office plugin module processes the response content using a built-in format adapter to match the format requirements of the current document type; Highlight the differences between the response content and the original text, and support users to confirm, modify or roll back paragraph by paragraph; The plugin caches user interaction history locally and automatically appends it to the Prompt context during subsequent requests.

[0049] The intelligent office plugin module processes the response content through a built-in format adapter, adjusting text formatting, paragraph spacing, etc., according to the current document type to ensure compatibility between the response content and the original document format. It highlights the differences between the response content and the original text, allowing users to confirm, modify, or roll back paragraph by paragraph, reducing trial-and-error costs and improving operational flexibility. The plugin locally caches user interaction history, automatically appending it to the Prompt context during subsequent requests, enabling the model to understand the contextual logic and supporting multi-turn dialogues for continuous modification. The "Optimizing Human-Computer Interaction Experience" section of the manual provides a detailed description of format adaptation and interactive functions, ensuring the feasibility of the technical solution.

[0050] The preferred solution also includes a Prompt dynamic fine-tuning step: Record user feedback data for each inference request, including usage frequency f and result acceptance rate R; Through the scoring function Assess the quality of the prompt, including , These are the weighting coefficients; Based on the evaluation results, iteratively optimize the presentation, task instructions, or example content of the Prompt.

[0051] The Prompt dynamic fine-tuning step was added, recording user feedback data for each inference request, including usage frequency f and result acceptance rate R, through a scoring function. Evaluate the quality of the prompt. In this formula, and The weighting coefficients are used to adjust the proportion of usage frequency and adoption rate in the score. f represents the frequency of user usage of the function corresponding to the Prompt, and R represents the user's adoption rate of the model's output. The score objectively reflects the degree to which the Prompt adapts to user needs. Based on the evaluation results, the Prompt's wording, task instructions, or example content are iteratively optimized to make the Prompt more aligned with user habits and improve model response quality. The "Constructing a Prompt Fine-tuning and Adaptation Mechanism" section of the specification provides detailed explanations of feedback records, scoring functions, and optimization processes, providing sufficient support for this claim.

[0052] The preferred solution also includes operation monitoring and resource management steps: Deploy a monitoring module to record metrics such as API call response time, vector library hit rate, and model response quality; Through response efficiency index function Statistical service data is collected and reports are generated regularly. Set model call quotas, adopt canary release and A / B testing mechanisms, and release the new version to the full population after verifying its features.

[0053] The program includes supplementary steps for operation monitoring and resource management. A monitoring module is deployed to record metrics such as API call response time, vector library hit rate, and model response quality, using a response efficiency metric function. The statistical service data includes a formula where the number of completed requests is the total number of user requests successfully processed by the system per unit time, and the total response time is the total time consumed in processing these requests. The calculation results can intuitively reflect the system's service efficiency. Regularly generated reports provide data support for system optimization. Model call quotas are set, and a canary release and A / B testing mechanism are adopted to verify the new version's functionality before full release, ensuring stability during system iteration. The "System Operation Monitoring and Stability Assurance" section of the specification provides specific details on monitoring indicators, resource management, and version releases, supporting the technical features of this claim.

[0054] The preferred solution also includes data security and compliance steps: The communication proxy module uses HTTPS or a local encrypted channel to transmit data; When calling the private model service module, the JWT identity token is verified, and the calling permission scope of different users is controlled through a multi-level permission system; The transmission log only retains the interface call status, execution time, and performance metrics, and does not record the document text or sensitive business data.

[0055] The documentation includes supplementary data security and compliance steps. The communication proxy module uses HTTPS or a local encrypted channel to transmit data, encrypting the data during transmission to prevent interception or tampering. When calling the private model service module, JWT identity tokens are verified, and a multi-level permission system controls the access permissions of different users, ensuring that only authorized users can access the corresponding functions. Transmission logs only retain interface call status, execution time, and performance metrics, excluding the main text of documents and sensitive business data to prevent leakage of sensitive information. The "Compliance and Data Security Control" section of the documentation provides detailed explanations of data encryption, access management, and logging to ensure that the technical solution meets data compliance requirements.

[0056] This intelligent office method achieves significant benefits in multiple aspects through the synergistic effect of the aforementioned technical features. The combination of private deployment and multiple security mechanisms ensures that enterprise office data flows entirely within the intranet, effectively protecting data confidentiality and compliance, and mitigating security risks from external networks. Model optimization and load balancing strategies reduce computing power overhead, improve system efficiency and concurrent processing capabilities, and can meet the needs of multiple users accessing the system simultaneously. The structured Prompt design and dynamic fine-tuning mechanism enable the model to accurately understand user needs and generate response content that meets the requirements of the office scenario, improving the quality of office documents. The integration and maintenance of a local knowledge base provides the model with enterprise-specific knowledge support, significantly improving the professionalism and contextual consistency of the response content, especially suitable for processing highly specialized office documents. Diverse interactive functions and adaptive design lower the learning threshold for users, improve operational convenience and flexibility, and adapt to the office needs of different terminals and document types. The system's operation monitoring and version iteration mechanism ensures continuous optimization and provides stable office support services over the long term. Overall, it significantly improves office efficiency and user experience, and solves problems such as insufficient data security, low response accuracy, and poor adaptability in existing technologies. It has broad promotional value.

[0057] Example 2 Further explanation in conjunction with Example 1, such as Figure 1-2 As shown, (1) Environment setup: Deploy the basic environment on the server side, including containerization management tools (such as Docker), GPU drivers and CUDA acceleration libraries, Python runtime environment and dependency management (such as conda, pip), and a privately deployed version of the JiLiang DeepSeek model image package. After environment deployment, system-level testing is required to confirm CUDA availability and normal network connectivity.

[0058] (2) Deployment of inference service When deploying the model inference service, use an inference engine that supports high concurrency and low latency (such as Triton Inference Server or vLLM) to load model weights and build local inference capabilities. To adapt to the "low latency + high frequency" call requirements in office scenarios, LoRA fine-tuning technology can be introduced to lightweight adapt the model, or INT4 / INT8 quantization strategies can be used to compress the model size, significantly reducing memory usage and improving response efficiency. For scenarios with multiple concurrent user requests, it is recommended to improve service availability and stability through multi-instance model deployment and load balancing strategies (such as building asynchronous services based on Nginx or FastAPI).

[0059] (3) Construct the model service interface: ① Set up the service communication interface: Once the inference service is deployed, the model call interface is exposed to the outside world through a standardized API (RESTful or gRPC), defining the interface path, request format, return format, etc., to facilitate subsequent access and call by WPS plugin modules.

[0060] ② Set access control: Access control mechanisms, including JWT Token authentication and IP whitelisting, are introduced at the interface layer to prevent unauthorized access and enhance system security. Simultaneously, to facilitate plugin development and debugging, a simple test console or Swagger interface documentation is provided, clearly defining the interface input format (such as the Prompt structure), output result structure, error return mechanism, and other related details. The completion of this phase signifies that LLM capabilities have been successfully built into a service-oriented architecture within the enterprise intranet, possessing the foundational capabilities to meet the requirements of compliant, secure, and controllable office scenarios.

[0061] 2. Large model plugin development and interface integration (1) Develop a plugin framework based on the WPS open platform ① Understand WPS plugin development specifications and platform interfaces First, visit the official WPS Open Platform and download its plugin development manual to clarify the supported development languages ​​(such as JavaScript and TypeScript) and runtime containers (WPS plugins run in a specific WebView environment). Focus on understanding the functions and limitations of various interfaces, such as wps.InvokeAction for performing document operations and wps.PluginStorage for local data persistence.

[0062] ② Plugin front-end interface design: The plugin is primarily displayed as a "sidebar" on the right side of the WPS document interface. The front-end page interacts with the document content through APIs provided by WPS, for example: Call the API "wps.WpsApplication().ActiveDocument.Content.Text" to retrieve the full text content.

[0063] (2) Implement document content interaction function ①Integrate WPS document manipulation API By calling built-in interfaces provided by WPS, such as retrieving selected text (wps.Application.Selection.Text) and inserting text at a specified position (InsertAfter()), the plugin enables synchronized reading and modification of the current document content. Interface behavior in various document formats (Word, spreadsheets, presentations) is tested to ensure compatibility.

[0064] ②: Handling the interaction boundaries of documents with different formats Since WPS supports multiple document types, different interface strategies need to be switched according to the currently opened document type. For example, the text processing API is used for Word documents, and the cell API is used for Excel documents. At the same time, it is necessary to be compatible with the processing of rich text content (including images, tables, hyperlinks, etc.) to avoid formatting errors caused by inserted text.

[0065] (3) Model service interface call and plugin communication ① Establish a local proxy communication channel To ensure that plugins can access large language models deployed privately on the intranet, a local HTTP proxy service (such as Nginx or Node middleware) can be configured to forward requests to the model's API address. For example, the request can be sent to http: / / localhost:8000 / infer, and then forwarded by the proxy to http: / / 10.0.0.1:8080 / llm / api.

[0066] ② Configure communication protocols and data structures Communication between plugins and model services typically uses RESTful APIs, requiring clear definition of the request structure (e.g., POST request body including text content, task type, etc.) and the response structure (e.g., model output, confidence level, etc.). An error code mechanism should also be established to ensure that plugins can return user-friendly messages when the model service malfunctions.

[0067] 3. Functional Module Design and Prompt Strategy (1) Constructing a functional module system ① Construct a functional module system Based on common office tasks, the functions are divided into categories such as "intelligent polishing", "format unification", "official document generation" and "contract review". Each functional module should include three components: a front-end button, a Prompt template for calling the model, and an output display method, so as to facilitate unified management and maintenance.

[0068] ② Design a unique interaction flow for each module Different modules correspond to different workflows. For example, the intelligent editing module requires extracting the main text paragraphs before sending them to the model for processing; while the contract review module requires selecting the contract paragraphs and attaching the legal background as auxiliary input. The plugin should automatically guide these workflows after the user triggers the operation, reducing the burden of manual operation.

[0069] (2) Optimize the Prompt design structure ① Use structured Prompt format A standardized four-part structure is adopted: "Identity Setting + Task Description + Input Content + Output Instructions." For example: "You are a professional document writing assistant. Please optimize the language of the following text: [Original Content], and output the optimized text." This format facilitates the reuse and automatic generation of Prompts.

[0070] ② Dynamically adjust Prompt parameters and content structure For complex tasks (such as contract clause analysis and document logic correction), 1-3 example pairs can be added to simulate the task input and output, improving the accuracy and consistency of the content generated by the large language model. Examples should closely resemble real-world office scenarios to avoid introducing generalization bias.

[0071] (3) Construct a Prompt fine-tuning and adaptation mechanism ① Establish a closed loop for feedback recording and strategy optimization The plugin records user feedback (such as whether suggestions were adopted) after each Prompt call, building a Prompt tuning database. Scoring functions can be defined, for example... ; in , These are weighting coefficients; the presentation, task instructions, or example content of the Prompt are iteratively optimized based on the evaluation results.

[0072] ② Dynamically adjust Prompt parameters and content structure Regularly optimize the Prompt content based on statistical results, such as modifying the wording, adding examples, and simplifying task descriptions, to make the Prompt more user-friendly and improve the quality and acceptability of model responses.

[0073] 4. Local knowledge integration and enhanced writing (1) Construction of local document knowledge base ①Document format standardization and cleaning Collect keywords and phrases related to compliance. These can include specific terms from laws and regulations, key points from industry standards, etc. For example, "personal information" and "data breach" in privacy laws.

[0074] ②Text vectorization and embedding storage The cleaned text is embedded using semantic coding models such as Sentence-BERT, as shown in the following formula: ; The generated vectors are used to build vector indexes using libraries such as FAISS to support subsequent semantic retrieval.

[0075] (2) RAG Enhanced Writing Process Design ① Perform semantic retrieval when a writing request is triggered After a user submits a task, the plugin extracts keywords and searches for similar content in the vector index, returning the k most relevant semantic fragments to supplement the Prompt context. The retrieval process uses cosine similarity to measure relevance. ; ② Build an enhanced Prompt input template By embedding search results as "supplementary background" into the Prompt, such as: Please refer to the following content to complete the writing task: [Search Content] [User Input], the professionalism and contextual consistency of the output can be greatly improved.

[0076] (3) Knowledge base maintenance and update mechanism ① Regular incremental document update mechanism To ensure the knowledge base aligns with actual business needs, a monthly update process is established. Text comparison algorithms are used to identify new, modified, and deleted portions of new business information. New knowledge is added in a structured manner, while modified information is overwritten and recorded. After completion, the documents are re-vectorized to improve the accuracy of retrieval and retrieval, ensuring real-time synchronization between the knowledge base and business operations.

[0077] ② Conflict resolution and content version management When knowledge documents are accumulated and updated, issues such as duplicate content and version differences are prone to occur. When the system detects duplicate content, it activates a deduplication algorithm to identify the source and scope, includes it in the version record, and marks its location and frequency. For documents with significant version differences, key changes are recorded by version number. A "latest priority" strategy is adopted, prioritizing the latest version when retrieving knowledge, effectively resolving document conflicts and improving the reliability and usability of the knowledge base.

[0078] 5. User experience and system stability optimization (1) Optimize human-computer interaction experience ① Design a controllable and traceable output structure The plugin output supports highlighting differences before and after modifications, and clicking allows users to roll back, reducing the cost of trial and error for users. The output text is displayed in paragraphs, supporting users to "confirm paragraph by paragraph" or "insert as a whole".

[0079] ②Integrated prompts and guidance system Each functional module is equipped with usage prompts, such as automatic pop-up instructions, first-time use guide pages, and input box drop-down prompts, to help users quickly understand the plugin's functions and operation process.

[0080] (2) System operation monitoring and stability assurance ①System operation monitoring and stability assurance Record metrics such as API call duration, whether the local knowledge base is hit, and model response quality for each call. A response efficiency metric function can be defined. ; Regularly generate reports to help optimize the Prompt strategy and knowledge base structure.

[0081] ② Gray-scale release and resource allocation mechanism Set call frequency limits for different users to prevent model overload caused by concentrated access in a short period. New features will first be launched through A / B testing, initially only available to select user groups. Whether to release them nationwide will be determined based on user feedback.

[0082] (3) Compliance and Data Security Control ①Permission and Authentication Mechanism Calling the model API requires an identity token (such as JWT). The backend verifies the caller's permissions to prevent the plugin from being used without authorization or maliciously abused.

[0083] ② Data encryption and transmission security The communication process between the plugin and the model is transmitted via HTTPS or a local encrypted channel to ensure that the document content is not leaked; no sensitive data fields are recorded in the transmission log, only the interface call status and execution time information are retained.

[0084] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.

Claims

1. An intelligent office plug-in system based on a privatized deployment of a large language model, characterized by: The system comprises a privatized model service module deployed on an intranet server, for loading a large language model and establishing an inference service environment; A communication agent module is connected between the intranet and the terminal, for establishing a secure communication channel and forwarding an inference request; An intelligent office plug-in module is integrated in WPS office software and is operationally bound to the current document through a document operation API; The intelligent office plug-in module captures the document context and user intent through the document operation API, generates request data, and sends it to the privatized model service module via the communication agent module; the privatized model service module performs inference calculation on the request data, and the generated response data is returned via the communication agent module and parsed by the intelligent office plug-in module and backfilled into the WPS document.

2. The intelligent office plug-in system based on a private deployment large language model according to claim 1, characterized in that: The large language model loaded by the privatized model service module is optimized using LoRA fine-tuning technology or INT4 / INT8 quantization strategy; The inference service environment configures vLLM or Triton Inference Server inference framework, exposes inference services through RESTful or gRPC API interfaces, sets up JWT Token authentication or IP whitelist access control mechanism, and supports multiple terminal concurrent calls using multi-instance deployment combined with Nginx or FastAPI load balancing strategy.

3. The intelligent office plug-in system based on a private deployment large language model according to claim 1, characterized in that: The intelligent office plug-in module is developed using JavaScript / TypeScript + HTML5, and is suitable for PC, mobile and web WPS environments; The plug-in module uses a modular architecture, integrates a lightweight Handlebars prompt template engine, configures event listeners and hook functions to achieve real-time response to document editing, and has a built-in format adapter for processing inference result formats; The document operation API includes interfaces for reading full text, selecting text, and inserting content, and supports interactive compatibility of multiple types of documents such as Word, Excel, and PowerPoint.

4. The intelligent office plug-in system based on a private deployment large language model according to claim 3, characterized in that: It also includes a local knowledge enhancement module that supports loading enterprise local documents in Word, PDF, and Excel formats, performs vectorization encoding through a Sentence-BERT model after document segmentation and content cleaning, builds a vector retrieval index using FAISS, and combines a knowledge graph to build a structured information enhancement mechanism; When the intelligent office plug-in module generates request data, it matches k relevant texts as extended context from the vector index through semantic retrieval, and embeds the request data to form a RAG enhanced inference request.

5. An intelligent office method based on private deployment of large language models, based on the system of any one of claims 1-4, characterized by: It comprises: S1, use the privatized model service module to build an intranet inference environment, optimize the parameters of the large language model, and deploy the service; S2, capture the user's document operation behavior and context content in WPS through the intelligent office plug-in module; S3, use the Prompt engine unit to build structured prompts, and send the request to the server through the communication agent module; S4, the private model service module performs inference calculation on the request and generates response content; S5, the intelligent office plug-in module receives the response content, performs format adaptation, and executes document update through the document operation API.

6. The intelligent office method based on a private deployment large language model according to claim 5, characterized in that: Step S1 specifically includes: Install container management tools, GPU drivers, CUDA acceleration libraries, and Python runtime environments on the intranet server, and configure PyTorch dependency components; Obtain the private deployment image or source package of the large language model, and adjust the model parameters using LoRA fine-tuning technology or INT4 / INT8 quantization strategy; Deploy vLLM or Triton Inference Server inference framework, configure RESTful or gRPC API interface, set JWT Token authentication or IP whitelist access control; Use model multi-instance deployment combined with load balancing strategy to complete service deployment.

7. The intelligent office method based on a private deployment large language model according to claim 5, characterized in that: Step S2 specifically includes: The intelligent office plug-in module captures user document operation behavior through event listening and hook functions; Call WPS native document operation API, including: wps.WpsApplication ().ActiveDocument.Content.Text, wps.Application.Selection.Text; Get document context content; For different document types such as Word, Excel, and presentation, switch to the corresponding API strategy to process rich text content.

8. The intelligent office method based on a private deployment large language model according to claim 5, characterized in that: Step S3 in the construction of structured prompt words specifically includes: Relying on the Handlebars lightweight Prompt template engine, construct the prompt word in a four-segment structure of "role setting + task instruction + input text + output format specification"; For complex office tasks, automatically attach 1-3 few-shot examples that fit the actual scenario; Splice user document context content to form a complete structured prompt word request.

9. The intelligent office method based on a private deployment large language model according to claim 5, characterized in that: Step S3 sends the request through the communication agent module, which specifically includes: Configure local HTTP proxy or intranet dedicated line as a secure communication channel for the communication agent module; Use RESTful protocol to define request data structure, clearly define request body containing text content and task type field; Establish error code mechanism, when the private model service module is abnormal, the intelligent office plug-in module returns prompt information.

10. The intelligent office method based on a private deployment large language model according to claim 5, characterized in that: Step S4 in combination with the local knowledge base enhancement module for inference calculation specifically includes: Extracting keywords in structured prompt words, through cosine similarity algorithm Retrieving in vector index library, wherein q is a user request vector, and d is a knowledge base text vector Get the k segments of text with the highest relevance and embed them into the structured prompt word as extended context; The generation of the text vector is implemented by the formula wherein is an encoding function of the Sentence-BERT model.

11. The intelligent office method based on a privatized deployment of a large language model according to claim 5, characterized in that: Also includes local knowledge base maintenance steps: Establish a regular incremental update process, identify new, modified, and deleted parts of local documents through text comparison algorithm; Re-perform text cleaning and vectorization encoding on the changed content, update vector index library and knowledge graph; Use the "latest first" strategy to handle document version conflicts and retain historical version records.

12. The intelligent office method based on a private deployment large language model according to claim 5, characterized in that: Step S5 specifically includes: The intelligent office plug-in module processes the response content through the built-in format adapter to match the format requirements of the current document type; Highlight the differences between the response content and the original text, support users to confirm, modify or rollback operation by section; The plug-in locally caches user historical interaction records, and automatically splices them into the Prompt context when subsequent requests are made.

13. The intelligent office method based on a private deployment large language model according to claim 5, characterized in that: It also includes the Prompt dynamic fine-tuning step: Record user feedback data for each reasoning request, including usage frequency f and result adoption rate R; By a scoring function Evaluate Prompt quality, where , is a weight coefficient; According to the evaluation results, iteratively optimize the expression of the Prompt, task instructions or example content.

14. The intelligent office method based on a private deployment large language model according to claim 5, characterized by: It also includes the running monitoring and resource management step: Deploy a monitoring module to record API call response time, vector library hit rate, model response quality and other indicators; by a response efficiency index function Statistics service-related data, generate reports regularly; Set model call quotas, use gray release and A / B testing mechanisms, and release the new version after verifying the function.

15. The intelligent office method based on a private deployment large language model according to claim 5, characterized by: It also includes the data security and compliance step: The communication agent module uses HTTPS or local encrypted channels to transfer data; When calling the private model service module, verify the JWT identity token and control the call permission range of different users through a multi-level permission system; The transmission log only retains interface call status, execution time and performance indicators, and does not record document text and business sensitive data.

Citation Information

Patent Citations

  • AI-Driven Multilingual Intelligent Document Summarization and Mind Map Generation System

    CN119494394B

  • Intelligent office assistant system based on natural language processing

    CN119721970A