Lightweight and locally deployed building contract AI examination system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-03-13
Smart Images

Figure CN121658151A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a lightweight, locally deployed AI review system for construction contracts. Background Technology
[0002] As a pillar industry of the national economy, the construction industry relies heavily on contracts as the core legal and commercial basis for project execution. However, the inherent characteristics of construction contracts present significant challenges to review. Construction projects encompass various categories, including EPC general contracting, construction subcontracting, and design contracting. These different types of contracts exhibit vastly different stipulations regarding the scope of liability, risk sharing, and payment settlement. Furthermore, contract texts generally suffer from inconsistent formats—there are both industry-standard templates and custom templates created by the owners themselves. Some contracts also suffer from diverse wording and internal contradictions, such as modifications to general clauses by special clauses requiring verification according to the order of priority of interpretation. More importantly, construction contracts are notoriously lengthy, with general contracting contracts often exceeding 100,000 words, and some complex project contracts even surpassing 300,000 words. This significantly increases the length of text compared to ordinary industry contracts, directly leading to time-consuming manual review. A single contract review often requires several hours or even days of dedicated professional attention, and prolonged focus can lead to attention deficits, resulting in the omission of critical risk clauses and potential economic disputes and losses for the company.
[0003] While some general-purpose AI contract review tools are currently in use, they struggle to meet the specific needs and security standards of the construction industry. Most general-purpose AI review tools are deployed on public clouds, requiring users to upload contract texts containing sensitive information such as bid prices, technical solutions, and commercial terms to third-party cloud platforms. This poses a risk of core business data being stored, analyzed, or leaked, failing to meet construction companies' compliance requirements for "full control and information confidentiality" of contract data. Furthermore, the localization of mainstream large-scale language models faces high hardware barriers. Traditional large-scale models rely on computing power clusters composed of multiple high-memory GPUs, with a single deployment costing hundreds of thousands of yuan. Cross-platform adaptation is complex, requiring continuous maintenance by a professional technical team, far exceeding the cost capacity of small and medium-sized construction companies. In addition, general-purpose AI models lack training in construction industry-specific knowledge, resulting in insufficient understanding of industry-specific clauses such as "engineering change orders" and "warranty periods linked to payments," leading to biased review results. They cannot accurately identify risk points unique to construction contracts and cannot replace the core judgments of professional reviewers.
[0004] As the construction industry accelerates its digital transformation, companies are increasingly demanding efficiency, security, and professionalism in contract review. On the one hand, the shortening of construction project cycles is forcing faster contract review processes, as traditional manual methods can no longer meet the needs of rapid project progress. On the other hand, stricter national regulations on data security and privacy protection are leading to increasingly stringent requirements for localized management of core business data. Simultaneously, specialized review standards in specific sub-sectors of the construction industry necessitate that AI tools possess industry-specific customization capabilities. The contradictions in efficiency, security, cost, and professional adaptability of existing technological solutions have slowed the progress of intelligent contract review in the construction industry, creating an urgent need for an AI review system that balances lightweight deployment, data security, and professional accuracy to fill the technological gap in the industry. Summary of the Invention
[0005] This invention proposes a lightweight, locally deployed AI review system for construction contracts to address the problems mentioned in the prior art.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a lightweight, locally deployed AI review system for construction contracts, comprising the following modules: The hardware deployment module includes two local servers: one is a computing server, which is responsible for large model inference and temporary document storage; the other is a front-end server, which is responsible for external access. Both servers are used to deploy systems and environments. Through the encapsulation platform, a unique virtual environment is configured for the framework to isolate related dependency library versions. The front-end interaction module is integrated into the China Construction Tong office platform, supports single sign-on, is compatible with both computer and mobile terminals, and displays the review progress and status in real time. The middleware management module adopts the RBAC permission model to build a control system, supports account management, role customization and permission allocation, and can adjust the display status of the front-end menu; The core backend processing module includes text preprocessing, AI review, prompt word engineering, and structured output unit: the text preprocessing unit completes the segmentation and format conversion of ultra-long contracts; the AI review unit loads a quantitative model and completes parallel inference on a GPU cluster with the help of a framework; the prompt word engineering unit drives inference through constraint instructions and standardized templates; and the structured output unit aggregates review results according to preset templates. The security protection module adopts a dual mechanism of physical isolation and network protection, physically separating the computing server from the front-end server; deploying a dual-machine heterogeneous firewall, and installing an enterprise-level endpoint security management system on the server and terminal to enable multiple security protections; The output module supports generating structured review reports, which include key information extraction results, a risk point identification list, and the original contract text as the basis. It classifies risks into four levels: low, medium, high, and extremely high, and specifies the response period.
[0007] Furthermore, it also includes a video memory optimization module, which calculates the optimal video memory allocation scheme based on the contract text length, model parameter scale, and number of concurrent users, and introduces a video memory usage optimization formula. in This indicates the optimal amount of video memory allocation. express The amount of contract text processed at any given time. This represents the memory usage coefficient of a single token after quantization of the Qwen3-32B-AWQ model. This represents the memory utilization correction factor. Indicates the total processing time for a single contract. Indicates the number of graphics cards in the GPU cluster. Indicates the first block graphics card The computing load factor at any given time. Indicates the first The priority weight of the graphics card's memory.
[0008] Furthermore, it also includes a risk rule configuration module, which allows users to configure multi-dimensional risk review rules through a visual interface. Users can set clause matching thresholds, risk level weights, and review priorities. The rule library contains preset types commonly used in the construction industry, and users can add custom risk clauses and associate them with corresponding review logic. The system automatically converts the configured rules into binding instructions that the model can recognize and updates them synchronously to the prompt word engineering unit. After the rules are modified, they take effect in real time through an incremental synchronization mechanism without the need to restart the system.
[0009] Furthermore, it also includes a risk scoring module, which calculates the overall risk value of the contract through multi-dimensional indicators and introduces a risk scoring formula. in Indicates the overall risk value of the contract. Indicates the number of risk assessment dimensions. The function representing the severity of the risk clause under the k-th evaluation dimension. and These indicate the start and end points of the text for the risk clause in this dimension, respectively. Indicates the first The weight coefficients of each evaluation dimension.
[0010] Furthermore, it also includes a model iteration and optimization module, which supports continuous optimization of AI review model performance based on user feedback data; the system automatically collects review result correction records and user satisfaction evaluations; updates model parameters through incremental training, and the optimization process uses 4-bit AWQ low-precision quantization technology to maintain lightweight characteristics without additional hardware resource overhead; the iterated model version can be switched with one click through the middle platform management module.
[0011] Furthermore, it also includes a contract information association module, which can extract key information from contracts to form a structured data graph; the data graph supports cross-contract information comparison, and the association clause identification covers the correspondence between the main contract and supplementary agreement under the same project; the system can generate a summary report of contract information according to user needs.
[0012] Furthermore, it also includes a text segmentation optimization module, which optimizes the segmentation strategy for ultra-long texts through a context-dependent algorithm and introduces a segmentation boundary optimization formula. in Indicates the optimal block boundary position. This indicates the total length of the contract text in characters. Indicates the first The character and the first Context relevance coefficient of each character This represents the mean of contextual relevance across the entire text. Represents the boundary smoothing factor. express A textual semantic coherence function for location.
[0013] Furthermore, it also includes a multimodal parsing module, which supports the recognition and parsing of non-textual content in contracts; it uses technology to extract text information from images, restores table data through table structure recognition algorithms and converts it into structured text, and uses a handwriting recognition model for handwritten content; after the parsing results are integrated with the text content, they participate in the AI review process. The system automatically marks the source location of non-textual content and the parsing results, and supports the association and display of the original non-textual content and the parsed text in the review report. The parsing results of non-textual content are incorporated into the entire AI review process.
[0014] Furthermore, it also includes a customizable review process module, which allows users to configure personalized review processes according to business needs; it allows setting the number of review nodes, the person in charge of each node and their approval permissions, and users can add special review steps; it allows setting the processing time limit and flow rules for each step, and the system automatically pushes process node reminders through China Construction Communication messages, and automatically escalates to the approval of the node person in charge's superior if the process is not processed within the time limit.
[0015] Furthermore, it also includes an offline review module, which supports contract review in a network-free environment; users can download the offline review package in advance, and the contract files uploaded in the offline state are stored on the local server, and the review process is completed entirely in the offline environment; after connecting to the network, the system automatically synchronizes the offline review data to the background database through an encrypted synchronization protocol, and supplements the results of the advanced review function in the network state after synchronization; it also supports cross-device synchronization of review progress.
[0016] Compared with existing technologies, the beneficial effects of this invention are: At the hardware deployment level, this invention significantly lowers the barrier to entry for enterprise applications through its lightweight design. The system employs GPU cluster optimized configuration and low-precision quantization technology, greatly reducing memory usage and avoiding the dependence on high-specification hardware for traditional large-model local deployment. Enterprises do not need to invest heavily in purchasing high-end computing equipment. At the same time, relying on containerization and virtual environment isolation technologies, it simplifies the cross-platform adaptation process and reduces the technical difficulty of deployment and maintenance. Even small and medium-sized construction enterprises can easily implement the system, breaking the limitations of AI review technology on enterprise size.
[0017] In terms of review efficiency, this invention accelerates the entire contract review process. The text preprocessing unit's segmentation and splicing technology solves the bottleneck of processing ultra-long contracts. Combined with GPU cluster parallel inference and dynamic memory allocation algorithms, it significantly shortens review time. Compared with traditional manual review, it can quickly complete the extraction of key contract information and risk identification, freeing reviewers from lengthy text reading so they can focus on high-value risk response and negotiation. At the same time, it reduces repetitive work in multi-level review stages and improves the overall efficiency of the contract management process.
[0018] In terms of data security, this invention constructs a comprehensive protection system. Through multiple mechanisms such as physical separation of computing servers and front-end servers, intranet isolation deployment, and dual-machine heterogeneous firewalls, it achieves a fully localized closed-loop processing of contract data from upload to review, completely eliminating the risk of data leakage from public cloud deployments. At the same time, relying on the RBAC permission model and operation log traceability function, it precisely controls the scope of data access, ensuring that sensitive contract information can only be viewed by authorized personnel, meeting the security and compliance requirements of construction companies for core business data.
[0019] In terms of professional adaptation, this invention is deeply aligned with the needs of the construction industry. The system incorporates a risk review rule library and contract templates specific to the construction industry, covering various contract scenarios such as EPC general contracting and construction subcontracting. Through industry-specific instruction design for project units with prompts, it enhances the AI model's understanding of construction-specific clauses, accurately identifying industry-specific risks such as mismatches between payment cycles and construction periods, and ambiguities in warranty period agreements. The professionalism and accuracy of the review results far exceed those of general AI tools, effectively assisting professionals in improving review quality.
[0020] In terms of system flexibility, this invention supports multi-dimensional customized configuration. The risk rule configuration module allows users to adjust the review logic according to their own risk control standards, the review process customization module can adapt to the review node requirements of different projects, and the model iteration optimization module can continuously improve performance based on user feedback, meeting the dynamic needs of construction companies at different development stages and for different project types, and avoiding the problem of insufficient applicability caused by the rigidity of system functions.
[0021] In terms of user experience, this invention optimizes the convenience of the entire process. The system is integrated into the enterprise's existing office platform, so users do not need to learn the operation logic of the new tool; the multimodal parsing module covers non-text content such as images, tables, and handwriting, avoiding omissions in the review; the offline review function supports normal use in environments without network access, and cross-device synchronization ensures that the review progress is not interrupted, comprehensively improving the convenience and continuity of user operation and reducing the cost of system promotion and use. Attached Figure Description
[0022] Figure 1 This is a schematic block diagram of a lightweight, locally deployed AI review system for construction contracts proposed in this invention; Figure 2 A comparison chart of deployment and total annual maintenance costs for different numbers of GPUs; Figure 3 A comparison chart of video memory usage under different concurrent user counts; Figure 4 The accuracy charts for multimodal parsing under different contract content types. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0025] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified. Furthermore, the terms "installed," "connected," and "linked" should be interpreted broadly; for example, they may refer to a fixed connection, a detachable connection, or an integral connection; they may refer to a mechanical connection or an electrical connection; they may refer to a direct connection or an indirect connection through an intermediate medium; and they may refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances. The invention will now be described in further detail with reference to the accompanying drawings.
[0026] Reference Figures 1 to 4 A lightweight, locally deployed AI-based construction contract review system, comprising the following modules: The hardware deployment module includes two localized servers. One server serves as a computing server, handling large model inference and temporary document storage. It is configured with NVIDIA L20 graphics cards (8 cards with 48GB of video memory each) to form a GPU cluster, with a total video memory of 384GB. The system disk uses 960GB x 2 RAID1 technology for full backup, and the data disk uses 8TB x 3 RAID5 technology for hot backup and fault tolerance. The other server serves as a front-end server for external access. Both servers are deployed with Ubuntu 22.04LTS operating system and CUDA 12.6 + cuDNN 8.9 deep learning environment. The Dify 1.41 intelligent agent platform is packaged using Docker 25.0.0 or later, and an independent Python 3.10 virtual environment is created for the vLLM 0.40.0 inference framework. Dependency library versions such as transformers 4.35.2 and accelerate 0.24.1 are isolated to avoid version conflict risks. The front-end interaction module is integrated into the enterprise's China Construction Tong office platform, supporting users to access the system through China Construction Tong single sign-on. It is compatible with both computer (resolution ≥1366×768) and mobile operation interfaces. It supports uploading contract files in PDF, DOCX, and XLSX formats, with a single upload of one or more contract files totaling no less than 10GB. It can accept user-defined risk review rule inputs and display the review progress (accurate to percentage) and status feedback (pending, processing, completed, abnormal) in real time. The middle platform management module adopts the RBAC permission model to build an integrated management and control system of "user-role-permission-menu". It supports the creation, deletion, information editing and status activation / deactivation of employee accounts. It can customize roles such as administrator, contract reviewer and ordinary query user and assign functional operation permissions (such as review initiation, result approval, rule configuration) and data access scope (such as department-level and project-level contract data). It can flexibly adjust the front-end menu display name, sorting level and hiding status, and retain all user operation logs (including operator, operation time, operation content and IP address) to achieve operation behavior traceability. The core backend processing module includes a text preprocessing unit, an AI review unit, a prompt word engineering unit, and a structured output unit. The text preprocessing unit uses "block processing + intelligent splicing" technology to automatically segment ultra-long contracts to a length of 100,000 characters and configure 1.5% redundancy between the beginning and end to preserve contextual relationships. It uses the Apache Tika 2.9.0 document extraction tool to convert the file format to the large model input standard. The AI review unit loads the Qwen3-32B-AWQ quantization model, which reduces the GPU memory usage from 160GB to 35-46GB through 4-bit precision quantization. It uses the PagedAttention mechanism of the vLLM framework to achieve parallel inference of the GPU cluster, outputting 500 tokens per second under 10 concurrent users. The prompt word engineering unit drives model inference through binding instructions (including field validation rules specific to construction industry contract review) and standardized templates (covering 6 types of contract review templates such as EPC general contracting and construction subcontracting) to suppress "AI illusion". The structured output unit aggregates review results according to preset templates, which contain fixed items such as key information fields and risk assessment standards. The security protection module employs a dual mechanism of physical isolation and network protection. The computing server and the front-end server are physically separated. The computing server is deployed in an isolated area within the internal network, allowing only designated IPs (mask 255.255.255.0) to communicate within the local area network. The front-end server is deployed in the internet area, handling only user authentication and request forwarding. A Huawei USG6000E and Sangfor NGAF series dual-machine heterogeneous firewall are deployed between the core router in the data center and the server area. The outer firewall filters malicious IPs and SQL injection attacks, while the inner firewall restricts unauthorized hosts from accessing the computing server and manages service ports (only ports 8080 and 443 are open). An enterprise-level endpoint security management system (integrating Kaspersky antivirus engine, host firewall, and application whitelist) is installed on the servers and office terminals, enabling real-time virus scanning, malicious code interception, and abnormal process monitoring. The output module supports generating structured review reports, which include key information extraction results (12 types of fields such as contract subject, amount, and payment method), a risk point identification list (including the original text of risk clauses, risk type, and risk level), and the corresponding original contract text (with page numbers and paragraphs marked). It supports PDF preview and DOCX and XLSX format download. The risk level in the review report is divided into four levels: low, medium, high, and very high, with corresponding risk response cycles of 7 days, 3 days, 1 day, and immediate processing, respectively. Risk rectification suggestions (including legal basis and modification direction) are also attached.
[0027] This invention also includes a video memory optimization module, which achieves efficient utilization of GPU resources through a dynamic video memory allocation algorithm. Based on the contract text length, model parameter scale, and number of concurrent users, it calculates the optimal video memory allocation scheme and introduces a video memory usage optimization formula. in Indicates the optimal video memory allocation (unit: GB). express Real-time contract text processing volume (unit: token / s). This represents the single-token memory usage coefficient of the Qwen3-32B-AWQ model after quantization (fixed at 0.00014GB / token). This represents the memory utilization correction factor (value range 0.85-0.95, dynamically calibrated based on historical memory utilization data). This indicates the total processing time for a single contract (in seconds). This indicates the number of graphics cards in the GPU cluster (n=8 in this system). Indicates the first block graphics card The computing load coefficient at any given time (the value ranges from 0 to 1, and the higher the load, the larger the coefficient). Indicates the first The memory priority weight of the graphics card (with a value range of 0.8-1.2, the core graphics card has a higher weight than the peripheral graphics card) is used to dynamically adjust the memory allocation ratio of each graphics card at different times, thereby controlling the probability of processing interruption caused by memory overflow to below 0.1%.
[0028] This invention also includes a risk rule configuration module, which allows users to configure multi-dimensional risk review rules through a visual interface (drag-and-drop operation). Users can set clause matching thresholds (character matching degree ≥85% is considered a hit), risk level weights (low risk 0.2, medium risk 0.4, high risk 0.6, extremely high risk 1.0), and review priorities (levels 1-5, with higher priorities being reviewed first). The rule base includes five preset types common in the construction industry: payment clause risks, breach of contract risks, construction period agreement risks, quality standard risks, and dispute resolution risks. Users can add custom risk clauses and associate them with corresponding review logic (e.g., "when the contract contains a clause 'advance payment ratio ≥30%', it is considered high risk"). The system automatically converts the configured rules into model-recognizable binding instructions and synchronously updates them to the prompt word engineering unit. Rule modifications take effect in real time through an incremental synchronization mechanism without requiring a system restart. The system supports rule version management (retaining nearly 10 historical versions) and historical version retrospective (viewing version modification records and modifiers).
[0029] This invention also includes a risk scoring module, which calculates the overall risk value of the contract through multi-dimensional indicators and introduces a risk scoring formula. in This represents the overall risk value of the contract (ranging from 0 to 100, with higher scores indicating higher risk). Indicates the number of risk assessment dimensions (in this system). =5, corresponding to 5 types of risks: payment, default, construction period, quality, and disputes. The function representing the severity of risk clauses under the k-th evaluation dimension ( This indicates the weighting factor of the risk clause in the contract, and is part of the main clause. =1. Annex Terms =0.7, The value ranges from 0 to 10, with higher values indicating greater severity. and These indicate the start and end positions of the text for the risk clause in this dimension (unit: characters). Indicates the first The weighting coefficients for each evaluation dimension (set according to the risk impact weighting standard in the construction industry, payment terms risk) =0.9, Risk of project schedule agreement =0.7, Risk of breach of contract =0.8, Quality Standard Risk =0.6, Dispute resolution risk =0.5), this formula comprehensively considers the cumulative effect and weight ratio of risks in various dimensions to achieve accurate quantification of risk level. When the risk value is ≥80, a pop-up warning and email notification will be automatically triggered, and a link to locate high-risk clauses will be pushed at the same time (clicking will jump to the corresponding page of the contract).
[0030] This invention also includes a model iteration and optimization module, which supports continuous optimization of AI review model performance based on user feedback data. The system automatically collects review result correction records (user corrections to AI misjudgment risks) and user satisfaction evaluations (1-5 points), and generates a model optimization report (including accuracy change trends and misjudgment type statistics) quarterly. Model parameters are updated through incremental training, with an incremental training data volume of no less than 500 fully annotated construction contract samples (covering EPC, construction, design, and other types) per quarter. The optimization process uses 4-bit AWQ low-precision quantization technology to maintain lightweight characteristics, with incremental memory usage controlled within 5GB, without additional hardware resource overhead. The iterated model version can be switched with one click through the middleware management module, supporting rollback to the last three historical stable versions. The rollback process takes no more than 30 seconds, and the model integrity and functional availability are automatically verified after rollback.
[0031] This invention also includes a contract information association module, which can extract key information from contracts to form a structured data graph. Key information includes the contracting party's name, address, bank account, contract amount (including uppercase and lowercase verification), payment method (payment cycle, percentage, account number), construction schedule (start date, completion date, key milestones), liability for breach of contract (liquidity penalty percentage, triggering conditions), and quality standards (acceptance basis, warranty period). The data graph supports cross-contract information comparison, and the association clause identification covers the correspondence between the main contract and supplementary agreement clauses under the same project (such as the supplementary agreement modifying the payment ratio of the main contract). Potential conflict identification includes scenarios such as mismatch between payment cycle and construction milestones, duplicate stipulations on liability division, and contradictions between warranty period and final payment conditions. The system can generate a contract information summary report according to user needs. The report supports exporting to Excel 2016 and above formats and includes eight analytical dimensions such as contracting party statistics, risk distribution trends, and review efficiency analysis. It supports filtering by contract signing time (year and month), project location, and contract type.
[0032] This invention also includes a text segmentation optimization module, which optimizes the segmentation strategy for ultra-long texts through a context-dependent algorithm and introduces a segmentation boundary optimization formula. in Indicates the optimal block boundary position (unit: character). This indicates the total length of the contract text in characters. Indicates the first The character and the first The contextual relevance coefficient of each character (calculated using cosine similarity, with a value range of 0-1). This represents the mean of contextual relevance across the entire text. The boundary smoothing factor (values range from 0.3 to 0.5; the higher the semantic complexity of the text, the smoother it becomes). (The larger the value) express The textual semantic coherence function of the location (calculated using the BERT-base-chinese model, with a value range of 0-1, and a larger value for more semantically coherent text) determines the block boundaries, which can preserve textual context information to the maximum extent and control the semantic breakage rate caused by block division to below 0.5%, ensuring the completeness and accuracy of the review of ultra-long contracts (≥300,000 words).
[0033] This invention also includes a multimodal parsing module, which supports the recognition and parsing of non-text content such as images, tables, and handwriting in contracts. It uses Tesseract 5.3.0 and above OCR technology to extract text information from images (recognition accuracy ≥98%), restores table data using the TableNet table structure recognition algorithm (supporting merged cells and nested table parsing), and converts it into structured text (CSV format). For handwriting content, it uses the CRNN+CTC handwriting recognition model for accurate recognition (recognition accuracy ≥95%). The parsing results are integrated with the text content and participate in the AI review process. The system automatically marks the source location (page number, coordinates) of the non-text content and the parsing results, supporting the related display of the original non-text content (thumbnail form) and the parsed text in the review report. The non-text content parsing results are incorporated into the entire AI review process, and the coverage of non-text content association and annotation in the review report reaches 100%.
[0034] This invention also includes a customizable review process module, allowing users to configure personalized review processes according to business needs. The number of review nodes (1-5), the responsible person for each node (designated internal employees), and approval permissions (approval, rejection, return for modification) can be set. The customizable process includes basic steps such as contract uploading, automatic review, manual review, and report generation. Users can add special review steps such as cross-departmental co-signing and expert review. Processing time limits (1-72 hours) and flow rules for each step can be set (automatic flow after timeout, rejection to the previous node). The system automatically pushes process node reminders via China Construction Communication (node start, 1-hour timeout warning). If the process is not processed within the time limit, it automatically escalates to the node responsible person's superior for approval. Visual tracking of process progress (Gantt chart format) and statistical analysis of process data (average processing time for each node, rejection rate statistics) are supported.
[0035] This invention also includes an offline review module, supporting contract review in a network-free environment. Users can download the offline review package in advance (approximately 20GB in size, containing the Qwen3-32B-AWQ simplified model, core review components, and a basic risk rule base, reducing the video memory requirement to 30GB). Contract files uploaded offline are stored on a local server (path: [path missing]). The review process is completed entirely offline, with the results temporarily stored in a local database. Once connected to the internet, the system automatically synchronizes the offline review data (including contract documents, review reports, and operation logs) to the backend database via an AES-256 encrypted synchronization protocol. The synchronization takes no more than 5 seconds. After synchronization, advanced review functions such as cross-contract comparison and verification of the latest legal clauses (updated in real time by accessing the national legal database) are added. The system supports cross-device synchronization of review progress (logging in with the same account allows access to offline review data from other devices). The field structure of the offline review data is completely consistent with that of the online review data, ensuring user continuity in different network environments.
[0036] The following two examples further illustrate specific embodiments of the present invention: Example 1: Scenario for reviewing EPC general contracting contracts of large construction companies This example is applied to the EPC general contracting contract review scenario of a large construction company. The company reviews more than 500 EPC contracts annually, with an average of 160,000 words per contract and some complex project contracts exceeding 300,000 words. The review involves multiple departments and has high requirements for system concurrency capabilities, review professionalism, and data security.
[0037] I. Hardware Deployment Module Implementation The hardware deployment module is configured with two localized servers. The computing server is a 2U rackmount server, configured with 8 GPUs, each with 48GB of video memory, for a total of 384GB of video memory. The system disk uses two 960GB SSDs in a RAID1 array, created using the mdadm tool. The configuration is completed by executing the command "mdadm --create / dev / md0 --level=1 --raid-devices=2 / dev / sda / dev / sdb", achieving full system data backup. The data disk uses three 8TB HDDs in a RAID5 array, configured by executing the command "mdadm --create / dev / md1 --level=5 --raid-devices=3 / dev / sdc / dev / sdd / dev / sde". Distributed parity checking enables hot data backup and fault tolerance, effectively handling single disk failures. The front-end server is a 1U rackmount server, configured with two 512GB SSDs in a RAID1 array to handle external access requests.
[0038] Both servers are running Ubuntu 22.04 LTS. The GPU driver was installed using the command `sudo apt-get install nvidia-driver-550`, followed by CUDA 12.6 and cuDNN 8.9. The CUDA version was verified using `nvcc -V` to ensure driver compatibility. The Dify 1.41 intelligent agent platform was packaged using Docker 25.0.0. The image was pulled using `docker pull langgenius / dify:1.41`, and the container was started using the command `docker run -d -p 8080:8080 -v / opt / dify / data: / app / datalanggenius / dify:1.41`, achieving environment isolation and one-click deployment. Create an independent Python 3.10 virtual environment for the vLLM 0.40.0 inference framework. Execute "python-mvenv / opt / vllm-env" to create the environment. After activation, install dependencies using "pip install vllm==0.40.0transformers==4.35.2accelerate==0.24.1" to isolate library version conflicts with the system's global environment.
[0039] II. Implementation of the Front-end Interaction Module The front-end interaction module is integrated into the enterprise's China Construction Bank office platform. After logging in with their China Construction Bank account, users can enter the system by clicking the "Contract AI Review" icon in the "Business Applications" section. The left side of the computer interface is the file upload area, which supports dragging and dropping or clicking to select PDF, DOCX, and XLSX format files. Multiple files can be uploaded at once, with a maximum total capacity of 10GB. The middle area is the progress display area, which displays the review progress in real time as a percentage, along with four status labels: "Pending," "Processing," "Completed," and "Abnormal." In the abnormal status, specific reasons such as "File format error" or "Text extraction failed" will be displayed. The right side is the rule input area, where users can select preset risk rules through the drop-down menu or enter custom rules by clicking the "Add Rule" button, such as "Mark as high risk when 'advance payment ratio ≥ 30%' appears in the contract."
[0040] The mobile interface is adapted for portrait mode display, with a simplified menu hierarchy. The file upload area is located at the top, supporting photo uploads of contracts and automatically triggering multimodal parsing. Progress is displayed as a circular progress bar, and the rule input area uses a pop-up window to avoid interface clutter. After a user uploads a 300,000-word EPC general contracting contract, the system displays "Processing (15%)" in the progress display area and prompts "Processing text in blocks, estimated remaining 1 minute and 30 seconds," allowing users to monitor the review progress in real time.
[0041] III. Implementation of the Middle Platform Management Module The middle platform management module adopts the RBAC permission model. System administrators create three types of roles through the "User Management" function: "Contract Reviewer," "Legal Reviewer," and "General Query User." The "Contract Reviewer" role is assigned permissions for "Contract Upload," "Review Initiation," and "Result Viewing," with data access limited to contracts within their department. The "Legal Reviewer" role is assigned permissions for "Risk Rule Configuration," "Review Result Approval," and "Operation Log Viewing," with data access covering all contracts across the company. The "General Query User" role is only assigned the "Review Result Query" permission, with data access limited to publicly available contracts.
[0042] In the "Menu Management" function, the administrator set the "Risk Rule Configuration" menu as a top-level menu on the computer and as a collapsed item on the mobile device, only displaying when "expanded" is clicked; the "Review Report Download" menu was reordered after "Review Result View" to align with user operation logic. The system retains all user operation logs, which include the operator's name, operation time, operation content, and IP address, for example, "Zhang San, 2025-11-20 09:15:30, initiated contract review, contract number EPC-20251120-001, IP address 192.168.1.105". The system supports filtering and searching by operator and time range to ensure traceability of operations.
[0043] IV. Implementation of Backend Core Processing Module 1. Text Preprocessing Unit After receiving the 300,000-word EPC contract uploaded from the front end, the text preprocessing unit automatically divides it into three blocks of 100,000 characters each. The first block contains characters 1-100,000; the second block contains characters 98,500-198,500 with 1,500 characters of redundancy; and the third block contains characters 197,000-300,000 with 1,500 characters of redundancy. The redundancy ensures the contextual integrity of cross-block clauses such as "engineering change orders" and "payment cycle matching the project duration." The Apache Tika 2.9.0 tool is then used to parse the DOCX format contract using the "tika-parsers-standard" dependency, extracting the text content, converting it to UTF-8 encoding, removing format specifiers and blank lines, and generating a plain text file that conforms to the large model input standard.
[0044] 2. AI Review Unit The Qwen3-32B-AWQ quantized model was loaded, and 4-bit precision quantization reduced the model's GPU memory usage from 160GB to 42GB. The inference service was started by executing the command "vllmserve-modelqwen / Qwen3-32B-AWQ--tensor-parallel-size8--gpu-memory-utilization0.9", distributing the model weights across 8 GPUs and leveraging the PagedAttention mechanism for parallel inference. When 10 users simultaneously initiated review requests, the system output 500 tokens per second, and the inference time for a single 300,000-word contract was controlled within 5 minutes.
[0045] 3. Prompt word engineering unit The model employs a standardized prompt template to drive inference. The template content is: "To review an EPC general contracting contract, the following tasks must be completed: 1. Extract key information, including the contract parties (name, unified social credit code, and address of Party A; name, unified social credit code, and address of Party B), contract amount (in words and figures), construction period (start date, completion date, key milestones), payment method (advance payment ratio, progress payment milestones, and final payment conditions), liability for breach of contract (liquidity penalty ratio and triggering conditions), and warranty period (duration and scope); 2. Identify risk points, referring to the EPC contract risk database in the construction industry, focusing on clauses with payment cycles exceeding 30 days, liquidated damages ratios below 0.05% / day, warranty periods shorter than 2 years, lack of approval procedures for engineering change orders, and dispute resolution methods other than arbitration or litigation, outputting the original text of the risk clauses and corresponding page numbers; 3. All results must be labeled with the basis to ensure traceability." This binding instruction clarifies the model's output scope and suppresses "AI illusions."
[0046] 4. Structured Output Unit The review results are aggregated according to a preset template, which includes three parts: "Key Information Extraction Table," "Risk Point Identification List," and "Rectification Suggestions." The Key Information Extraction Table is presented in tabular form, for example, "Contract Parties - Party A: XX Construction Group Co., Ltd., Unified Social Credit Code: XXXXXXXXXXXXXXXXXX, Address: No. XX, XX Road, XX District, XX City, XX Province"; the Risk Point Identification List indicates the risk level, for example, "High Risk - Clause Content: 'Progress payment cycle is 45 days', Page: P28, Risk Type: Excessively Long Payment Cycle"; the rectification suggestions include the legal basis, for example, "Based on the 'Interim Measures for Settlement of Construction Project Prices,' it is recommended to adjust the payment cycle to within 30 days."
[0047] V. Implementation of Safety Protection Module The computing server is deployed in an isolated intranet area, and the router is configured to allow access only from IP addresses in the 192.168.1.0 / 24 network segment. The front-end server is deployed in the internet area, with only ports 8080 (HTTP) and 443 (HTTPS) open. Two heterogeneous firewalls are deployed between the core router in the data center and the servers. The outer firewall is configured to block malicious traffic from IP addresses in the 192.168.2.0 / 24 segment and filter SQL injection statements containing "OR1=1". The inner firewall is configured to allow the front-end server IP address 192.168.1.20 to access port 50051 (vLLM service port) of the computing server.
[0048] The server and office terminals are equipped with an enterprise-level endpoint security management system, enabling real-time virus scanning and hourly virus database updates; host firewalls are enabled to block unauthorized port communication; and application whitelists are set up to allow only essential applications such as Ubuntu system programs, Docker, and Python to run. When a terminal attempts to run an unknown program, the system automatically blocks it and logs the request, ensuring endpoint security.
[0049] VI. Implementation of the Result Output Module Generate structured review reports, supporting PDF preview and DOCX and XLSX download. The PDF preview page has a table of contents on the left; clicking "Risk Point Identification List" will take you to the corresponding page. The DOCX format report retains tables and bold formatting for easy annotation modification by reviewers. The XLSX format report is stored in separate sheets for "Key Information," "Risk Points," and "Rectification Suggestions," supporting data filtering and statistics. Risk levels in the report are indicated by different colors: low risk in blue, medium risk in yellow, high risk in red, and extremely high risk in dark red, visually distinguishing the severity of risks. It also includes suggested risk response timelines: high-risk clauses are recommended for processing within 1 day, and medium-risk clauses within 3 days.
[0050] VII. Implementation of Additional Modules 1. Video memory optimization module Application memory usage optimization formula ,in Indicates the optimal video memory allocation (unit: GB). express Real-time contract text processing volume (unit: token / s). This represents the single-token memory usage coefficient of the Qwen3-32B-AWQ model after quantization (fixed at 0.00014GB / token). This represents the memory utilization correction factor (value range 0.85-0.95, dynamically calibrated based on historical memory utilization data). This indicates the total processing time for a single contract (in seconds). Indicates the number of graphics cards in the GPU cluster (in this system). =8), Indicates the first block graphics card The computing load coefficient at any given time (the value ranges from 0 to 1, and the higher the load, the larger the coefficient). Indicates the first The memory priority weight of the graphics card (range 0.8-1.2, with the core graphics card having a higher weight than the peripheral graphics card).
[0051] In this embodiment =300s (total processing time for a single 300,000-word contract). The average processing volume is 333 tokens / s (300,000 characters ÷ 900 characters / 1,000 tokens ≈ 333 tokens). =0.00014GB / token =0.9 (calibrated based on memory utilization data from the past 30 days). =8, Take 0.8, =1.0 (8 graphics cards have the same priority). Calculated... That is, the optimal amount of video memory allocated to each graphics card is about 2GB. The system dynamically adjusts this value to keep the probability of processing interruption caused by video memory overflow below 0.1%.
[0052] 2. Risk Scoring Module Application of risk scoring formula ,in This represents the overall risk value of the contract (ranging from 0 to 100, with higher scores indicating higher risk). Indicates the number of risk assessment dimensions (in this system). =5, corresponding to 5 types of risks: payment, default, construction period, quality, and disputes. Indicates the first The severity function of risk clauses under each evaluation dimension ( This indicates the weighting factor of the risk clause in the contract, and is part of the main clause. =1. Annex Terms =0.7, The value ranges from 0 to 10, with higher values indicating greater severity. and These indicate the start and end positions of the text for the risk clause in this dimension (unit: characters). Indicates the first The weighting coefficients for each evaluation dimension (set according to the risk impact weighting standard in the construction industry, payment terms risk) =0.9, Risk of project schedule agreement =0.7, Risk of breach of contract =0.8, Quality Standard Risk =0.6, Dispute resolution risk =0.5).
[0053] This embodiment takes payment risk as an example. =12000 characters =15000 characters =1 (Main clause) =8 (Payment cycle 45 days, high severity). The squared value is 5.76 × 10 8 multiplied by =0.9 gives 5.184 × 10 8 The other dimensions were calculated similarly and then summed to obtain 1.2 × 10⁻⁶. 9 , take the square root ≈34600, after normalization it becomes 34.6 (belonging to medium risk), the system triggers a yellow warning, prompting reviewers to pay close attention.
[0054] 3. Text Segmentation Optimization Module Applying the block boundary optimization formula ,in Indicates the optimal block boundary position (unit: character). This indicates the total length of the contract text in characters. Indicates the first The character and the first The contextual relevance coefficient of each character (calculated using cosine similarity, with a value range of 0-1). This represents the mean of contextual relevance across the entire text. The boundary smoothing factor (values range from 0.3 to 0.5; the higher the semantic complexity of the text, the smoother it becomes). (The larger the value) express The text semantic coherence function of the location (calculated using the BERT-base-chinese model, with a value range of 0-1, the larger the value for more semantically coherent text).
[0055] In this embodiment =300,000 characters Cosine similarity is used for calculation. =0.7 (mean relevance of the entire text). =0.4, The result, calculated using the BERT-base-chinese model, is 0.8. This is achieved through iteration... =100000, 98500, 99000, etc., calculated =98500 hours , The sum is 0.66, which is the minimum value, therefore it is determined. =98500 characters, meaning the starting position of the second block is 98500 characters, ensuring that the "Engineering Change Visa Approval Process" clause is fully preserved.
[0056] VIII. Data Representation and Interpretation Table 1: Comparison of Contract Review Efficiency and Accuracy in Example 1 Table 1 Explanation of Data: Manual review relies on professionals reading contracts word by word. A 160,000-word contract takes 8 hours, and a 300,000-word contract, due to its length and decreased attention span, takes 24 hours. Furthermore, key information extraction is prone to errors due to human negligence, resulting in an accuracy rate of only 85%. Risk identification also suffers from omissions due to experience differences, with an omission rate of 13%. This system, through text segmentation and GPU parallel reasoning, significantly reduces the time required, completing a 160,000-word contract in 2 minutes and a 300,000-word contract in 5 minutes. Leveraging industry-specific prompts and structured output, the accuracy rate for key information extraction is increased to 98%, the accuracy rate for risk identification reaches 95%, and the omission rate is reduced to 3%. The data shows that the system is significantly superior to manual review in both efficiency and accuracy, effectively reducing the workload of reviewers and minimizing risk omissions caused by human factors.
[0057] Example 2: Scenario for reviewing subcontracting contracts of small and medium-sized construction enterprises This example is applied to the subcontract review scenario of a small and medium-sized construction company. The company reviews about 200 subcontract contracts annually, with an average word count of 80,000 words per contract. The format is mainly PDF, with some contracts containing handwritten annotations and tables. The company has a limited budget and no professional IT maintenance team, so it has high requirements for system deployment cost, ease of operation, and offline use.
[0058] I. Hardware Deployment Module Implementation The hardware deployment module consists of two entry-level local servers. The computing server is a 4U tower server with eight GPUs, each with 48GB of VRAM, for a total of 384GB. The system disk uses two 960GB SSDs in a RAID 1 configuration, configured via the server's built-in RAID card without additional commands. The data disk uses three 8TB HDDs in a RAID 5 configuration, also configured via the RAID card's visual interface for simplified operation. The front-end server is a micro-tower server with two 512GB SSDs in a RAID 1 configuration to meet external access requirements.
[0059] Two servers are running Ubuntu 22.04 LTS. GPU drivers are installed using the built-in "Software and Updates" tool, avoiding complex commands. CUDA 12.6 and cuDNN 8.9 are installed, with environment variables automatically configured using the NVIDIA official installation script "sudo bash cuda_12.6.0_560.35.03_linux.run". Docker Compose is used to deploy Dify 1.41. A docker-compose.yml file is written to define the service, and "docker-composeup -d" is executed to start the container with a single click, reducing manual configuration steps. A Python virtual environment is created for vLLM 0.40.0. The command "conda create -nvllm-env python=3.10" simplifies dependency management using the conda tool, activating and installing dependencies, lowering the technical barrier to entry.
[0060] II. Implementation of the Front-end Interaction Module The front-end interaction module is integrated into the enterprise's China Construction Tong office platform, primarily used on mobile devices. The interface is simple, with a "Contract Upload" button at the top, supporting both "file upload" and "photo upload" methods. Photo upload automatically triggers a multimodal parsing module to recognize text and handwritten annotations in the contract photo. The middle section is a "Review Records" list, displaying the contract name, review status, and submission time. Clicking on a record allows viewing the review report. The bottom section is the "Rules Center," containing "Common Rules" and "My Rules" options. Common rules include preset basic rules such as "subcontract payment ratio ≥ 70%" and "warranty period ≥ 1 year." Users can quickly apply these rules by clicking "Add to My Rules," eliminating the need for manual input.
[0061] A user uploads an 80,000-word subcontracting contract with handwritten annotations in PDF format. The system automatically recognizes the file type and prompts "Parsing the handwritten annotations in the PDF, estimated 10 seconds." After parsing is completed, the progress display area shows "Processing (40%)" and pops up a message "Estimated 30 seconds remaining," which is in line with the operating habits of small and medium-sized enterprise users.
[0062] III. Implementation of the Middle Platform Management Module The middle platform management module simplifies role settings, creating only two roles: "Administrator" and "Reviewer". Administrators have full functional permissions, including the ability to create reviewer accounts and configure menu displays; reviewers have permissions for "Contract Upload", "Review Initiation", and "Result Viewing", with data access covering all company contracts. Small and medium-sized enterprises have fewer departments and do not require further departmental permission settings.
[0063] In the "Menu Management" section, the administrator hides the "Risk Rule Configuration" option, allowing rules to be preset directly in the backend to prevent auditors from making mistakes. The "Review Report Download" option is set as a top-level menu item for users to quickly access results. The operation log only records critical operations, such as "Li Si, 2025-11-20 14:30:15, uploaded a subcontract, contract number SUB-20251120-001." The log interface supports searching by contract number, simplifying the query process.
[0064] IV. Implementation of Backend Core Processing Module 1. Text Preprocessing Unit Upon receiving an 80,000-word subcontract, the entire text context is directly preserved without dividing it into blocks (only one block) based on a length of 100,000 characters. If the contract contains tables, the table extraction function of Apache Tika is called to convert the table data into the format of "row number-column number-content", such as "Table 1-row 2-column 3: subcontract price: 5 million yuan". If there are handwritten annotations, the multimodal parsing module is triggered to extract the annotation text through Tesseract 5.3.0 OCR, such as "handwritten annotation: 'warranty period extended to 18 months', page number: P15", and then the data is integrated to generate a plain text file.
[0065] 2. AI Review Unit Loading the Qwen3-32B-AWQ simplified model, and reducing GPU memory usage to 35GB through 4-bit precision quantization, the service is started by executing the command "vllmserve-modelqwen / Qwen3-32B-AWQ--tensor-parallel-size8--gpu-memory-utilization0.85", which lowers the GPU memory utilization threshold and adapts to the heat dissipation capabilities of small and medium-sized enterprise servers. With 5 users concurrently reviewing the contract, the system outputs 450 tokens per second, and a single 80,000-word contract takes 1 minute to process.
[0066] 3. Prompt word engineering unit A simplified prompt template is used: "Review subcontracts, extract contract parties, scope of work, contract amount, payment method, and warranty period; identify risk points, focusing on clauses with payment ratios below 70%, warranty periods shorter than 1 year, and no agreed-upon project acceptance standards, and output the original risk text and page numbers." The template reduces technical jargon, making it easier for the model to understand, while covering the core review needs of subcontracts for SMEs.
[0067] 4. Structured Output Unit The review report adopts a "concise" format, which only includes two parts: "Key Information" and "Risk Points". Key information is presented with bullet points, such as "-Contract Amount: RMB 5 million (lowercase), RMB Five Million Yuan Only (uppercase)". Risk points are marked with "Whether Rectification is Required", such as "-Risk Clause: 'Payment Ratio is 60%', Page Number: P10, Whether Rectification is Required: Yes", reducing the difficulty of understanding for users.
[0068] V. Implementation of Safety Protection Module The computing server is deployed on the enterprise intranet, and access is restricted to enterprise office terminal IPs via router settings. The front-end server only opens port 443 (HTTPS) and closes port 80 to avoid HTTP plaintext transmission. A single firewall is used, which is cost-effective for small and medium-sized enterprises. Basic rules are configured to block common malicious IPs and attack statements. A free version of the endpoint security management system is installed on the server, and basic virus scanning and firewall functions are enabled to meet the security needs of small and medium-sized enterprises.
[0069] VI. Implementation of the Result Output Module Supports downloading in both DOCX and PDF formats. DOCX reports use simplified tables with no complex formatting; PDF reports include a "one-click print" button for convenient paper archiving. Risk points in the report are marked with "★" to indicate their severity: ★ for low risk, ★★ for medium risk, and ★★★ for high risk, making it intuitive and easy to understand. For example, "★★ Risk Clause: 'Warranty period is 6 months', Page: P12".
[0070] VII. Implementation of Additional Modules 1. Offline review module When connected to the internet, clicking the "Download Offline Package" button in "Offline Settings" will automatically download an approximately 20GB offline review package. This package includes the Qwen3-32B-AWQ simplified model, a basic risk rule base (including subcontract pre-defined rules), and core components. Upon completion, a message will appear stating "Offline mode is enabled." In offline mode, uploaded contract files are stored in the / opt / contract / offline_data directory. The review process does not rely on the network, and review results are temporarily stored in a local SQLite database.
[0071] After connecting to the network, the system synchronizes offline data via the AES-256 encryption protocol, taking 3 seconds. Following synchronization, a "latest regulatory verification" function is added, such as verifying whether the "payment ratio of 60%" complies with the latest 2025 "Administrative Measures for Subcontracting Contracts in Construction Projects." If it does not comply, rectification suggestions are updated to ensure compliance of the review results. The system supports cross-device synchronization of review progress; users can access offline review data from other devices by logging into the same account. The field structure of offline review data is completely consistent with that of online review data, ensuring user continuity across different network environments.
[0072] 2. Multimodal Analysis Module When processing contract photos containing handwritten annotations, a CRNN+CTC handwriting recognition model is used. The image is first preprocessed using OpenCV (denoising and binarization) and then input into the model for recognition, achieving an accuracy rate of 95%. For example, the handwritten "18-month warranty period" is accurately extracted into text. When processing tables, the TableNet model is used to recognize table borders and cells and restore the data structure. For example, "Project Name - Exterior Wall Insulation, Quantity - 1000㎡, Unit Price - 200 RMB / ㎡" in the "Subcontracted Project List" table is accurately extracted, integrated, and then used for AI review to avoid missing non-text content.
[0073] 3. Video Memory Optimization Module Application memory usage optimization formula ,in Indicates the optimal video memory allocation (unit: GB). express Real-time contract text processing volume (unit: token / s). This represents the single-token memory usage coefficient of the Qwen3-32B-AWQ model after quantization (fixed at 0.00014GB / token). This represents the memory utilization correction factor (value range 0.85-0.95, dynamically calibrated based on historical memory utilization data). This indicates the total processing time for a single contract (in seconds). This indicates the number of graphics cards in the GPU cluster (n=8 in this system). Indicates the first block graphics card The computing load coefficient at any given time (the value ranges from 0 to 1, and the higher the load, the larger the coefficient). Indicates the first The memory priority weight of the graphics card (range 0.8-1.2, with the core graphics card having a higher weight than the peripheral graphics card).
[0074] In this embodiment =60s (total processing time for 80,000-word contract). =133 tokens / s (80,000 characters ÷ 600 characters / 1,000 tokens ≈ 133 tokens). =0.00014GB / token =0.85 (Small and medium-sized enterprise servers have lower loads, so the calibration value is slightly lower). =8, =0.6, =1.0 (8 graphics cards have the same priority). Calculated... That is, the optimal amount of video memory allocated to each graphics card is about 0.2GB, and the system allocates it according to this value to avoid wasting video memory.
[0075] VIII. Data Representation and Interpretation Table 2: Comparison of Hardware Deployment Costs in Example 2 Table 2 data explanation: Traditional large-scale local deployment requires 16 GPUs to meet the video memory requirements. The system and data disks need to be arranged in a RAID array, resulting in deployment costs as high as 500,000 yuan. Furthermore, a professional IT team is required for maintenance, with annual maintenance costs of 50,000 yuan, far exceeding the budgets of small and medium-sized enterprises (SMEs). This system, through low-precision quantization and GPU cluster optimization, requires only 8 GPUs with a total video memory of 384GB. The number of system and data disks is reduced, lowering the deployment cost to 150,000 yuan. Relying on containerization and simplified configuration, no professional operations and maintenance team is needed, with annual maintenance costs of 10,000 yuan. The data shows that this system significantly reduces hardware deployment and maintenance costs, making AI review technology affordable for SMEs and promoting the widespread adoption of intelligent contract review in the construction industry.
[0076] Reference Figure 2 This chart illustrates the cost differences between the two solutions under different GPU configurations. Traditional large-scale model solutions require high video memory support, with the total cost increasing proportionally with the number of GPUs, reaching 750,000 yuan with 20 GPUs. Furthermore, a professional maintenance team is needed, resulting in high annual maintenance costs. This system, through lightweight technologies such as 4-bit quantization and dynamic video memory allocation, reduces hardware dependence, achieving a total cost of only 300,000 yuan with 20 GPUs. It also requires no professional maintenance, resulting in low annual maintenance costs. This demonstrates that this system offers cost advantages across different hardware configurations, meeting the high-concurrency needs of large enterprises while allowing small and medium-sized construction companies to implement AI review technology at a lower cost, breaking down the cost barriers of traditional solutions.
[0077] Reference Figure 3 This graph illustrates the system's performance in multi-user concurrent scenarios with its optimized video memory usage. The unoptimized solution shows a rapid increase in video memory usage with the number of concurrent users, reaching 85GB with 10 users, easily triggering video memory overflow and causing system lag. This system, through technologies such as the PagedAttention mechanism and dynamic video memory allocation formula, achieves only 32GB of video memory usage with 10 users, and the growth trend is gradual. This demonstrates that the system can operate stably in high-concurrency scenarios, avoiding the impact of insufficient video memory on review efficiency. It is particularly suitable for the simultaneous operation needs of multiple users during concentrated contract review periods in construction companies (such as the end of the month or quarter), ensuring overall system stability and response speed.
[0078] Reference Figure 4This diagram illustrates the system's multimodal parsing module's ability to process various types of content in construction contracts. The accuracy rate for plain text parsing reaches 99%, demonstrating the system's efficient processing of standard text. The accuracy rate for non-text content such as tabular data, image text, and handwritten annotations all exceed 92%, while the accuracy rate for mixed content is 93%. This is due to the use of technologies such as Tesseract OCR, TableNet, and CRNN+CTC, which accurately extract non-text information. This overcomes the limitation of traditional AI review systems that can only process plain text, adapting to common scenarios in construction contracts such as bills of quantities tables, handwritten modification annotations, and attached images, ensuring thorough review and further improving the comprehensiveness and accuracy of contract review.
[0079] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A lightweight, locally deployed AI-based construction contract review system, characterized in that, Includes the following modules: The hardware deployment module includes two local servers: one is a computing server, which is responsible for large model inference and temporary document storage; the other is a front-end server, which is responsible for external access. Both servers are used to deploy systems and environments. Through the encapsulation platform, a unique virtual environment is configured for the framework to isolate related dependency library versions. The front-end interaction module is integrated into the China Construction Tong office platform, supports single sign-on, is compatible with both computer and mobile terminals, and displays the review progress and status in real time. The middleware management module adopts the RBAC permission model to build a control system, supports account management, role customization and permission allocation, and can adjust the display status of the front-end menu; The core backend processing module includes text preprocessing, AI review, prompt word engineering, and structured output unit: the text preprocessing unit completes the segmentation and format conversion of ultra-long contracts; the AI review unit loads a quantitative model and completes parallel inference on a GPU cluster with the help of a framework; the prompt word engineering unit drives inference through constraint instructions and standardized templates; and the structured output unit aggregates review results according to preset templates. The security protection module adopts a dual mechanism of physical isolation and network protection, physically separating the computing server from the front-end server; deploying a dual-machine heterogeneous firewall, and installing an enterprise-level endpoint security management system on the server and terminal to enable multiple security protections; The output module supports generating structured review reports, which include key information extraction results, a risk point identification list, and the original contract text as the basis. It classifies risks into four levels: low, medium, high, and extremely high, and specifies the response period.
2. The lightweight, locally deployed AI review system for construction contracts according to claim 1, characterized in that, It also includes a video memory optimization module, which calculates the optimal video memory allocation scheme based on the contract text length, model parameter scale, and number of concurrent users, and introduces a video memory usage optimization formula. in This indicates the optimal amount of video memory allocation. express The amount of contract text processed at any given time. This represents the memory usage coefficient of a single token after quantization of the Qwen3-32B-AWQ model. This represents the memory utilization correction factor. This indicates the total processing time for a single contract. Indicates the number of graphics cards in the GPU cluster. Indicates the first block graphics card The computing load factor at any given time. Indicates the first The priority weight of the graphics card's memory.
3. The lightweight, locally deployed AI review system for construction contracts according to claim 1, characterized in that, It also includes a risk rule configuration module, which allows users to configure multi-dimensional risk review rules through a visual interface. Users can set clause matching thresholds, risk level weights, and review priorities. The rule library contains preset types commonly used in the construction industry, and users can add custom risk clauses and associate them with corresponding review logic. The system automatically converts the configured rules into binding instructions that the model can recognize and updates them synchronously to the prompt word engineering unit. After the rules are modified, they take effect in real time through an incremental synchronization mechanism without the need to restart the system.
4. The lightweight, locally deployed AI review system for construction contracts according to claim 1, characterized in that, It also includes a risk scoring module, which calculates the overall risk value of the contract through multi-dimensional indicators and introduces a risk scoring formula. in Indicates the overall risk value of the contract. Indicates the number of risk assessment dimensions. The function representing the severity of the risk clause under the k-th evaluation dimension. and These indicate the start and end points of the text for the risk clause in this dimension, respectively. Indicates the first The weight coefficients of each evaluation dimension.
5. The lightweight, locally deployed AI review system for construction contracts according to claim 1, characterized in that, It also includes a model iteration and optimization module, which supports continuous optimization of AI review model performance based on user feedback data; the system automatically collects review result correction records and user satisfaction evaluations; updates model parameters through incremental training, and the optimization process uses 4-bit AWQ low-precision quantization technology to maintain lightweight characteristics without additional hardware resource overhead; the iterated model version can be switched with one click through the middle platform management module.
6. The lightweight, locally deployed AI review system for construction contracts according to claim 1, characterized in that, It also includes a contract information association module, which can extract key information from contracts to form a structured data graph; the data graph supports cross-contract information comparison, and the association clause identification covers the correspondence between the main contract and supplementary agreement under the same project; the system can generate a summary report of contract information according to user needs.
7. The lightweight, locally deployed AI review system for construction contracts according to claim 1, characterized in that, It also includes a text segmentation optimization module, which optimizes the segmentation strategy for ultra-long texts through a context-dependent algorithm and introduces a segmentation boundary optimization formula. in Indicates the optimal block boundary position. This indicates the total length of the contract text in characters. Indicates the first The character and the first Context relevance coefficient of each character This represents the mean of contextual relevance across the entire text. Represents the boundary smoothing factor. express A textual semantic coherence function for location.
8. The lightweight, locally deployed AI review system for construction contracts according to claim 1, characterized in that, It also includes a multimodal parsing module, which supports the recognition and parsing of non-textual content in contracts; it uses technology to extract text information from images, restores table data through table structure recognition algorithms and converts it into structured text, and uses a handwriting recognition model for handwritten content; after the parsing results are integrated with the text content, they participate in the AI review process. The system automatically marks the source location of non-textual content and the parsing results, and supports the association and display of the original non-textual content and the parsed text in the review report. The parsing results of non-textual content are incorporated into the entire AI review process.
9. A lightweight, locally deployed AI review system for construction contracts according to claim 1, characterized in that, It also includes a customizable review process module, which allows users to configure personalized review processes according to their business needs; it allows users to set the number of review nodes, the person in charge of each node and their approval permissions, and users can add special review steps. Set processing time limits and workflow rules for each stage. The system will automatically push process node reminders through China Construction Communication. If the process is not processed within the time limit, it will automatically escalate to the approval of the node's supervisor.
10. A lightweight, locally deployed AI review system for construction contracts according to claim 1, characterized in that, It also includes an offline review module, which supports contract review in environments without a network connection. Users can download the offline review package in advance, and the contract files uploaded offline are stored on the local server. The review process is completed entirely in an offline environment. After connecting to the network, the system automatically synchronizes the offline review data to the backend database through an encrypted synchronization protocol. After synchronization, the results of the advanced review function in the online state are supplemented. It also supports cross-device synchronization of review progress.
Citation Information
Patent Citations
High-concurrency large language model high-speed reasoning deployment method
CN118409853A
Enterprise management industry intelligent contract review method and system based on large model
CN119048295A
Large-model training method, apparatus and device, and storage medium
WO2025185304A1