A method and system for configuring contract templates and dynamically generating contract documents

By automating text field parsing and multi-rule validation, combined with unified data processing services, the problem of template configuration relying on manual identification and non-standard formatting during the generation stage in existing technologies has been solved. This has enabled the automation and standardization of contract document generation, improved configuration accuracy and efficiency, and reduced error rates and resource waste.

CN123070077APending Publication Date: 2026-11-10SHANGHAI ZHONGSHENG SHUZHI HIGH-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611183510.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-05
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In the current contract document generation process, template configuration relies on manual identification of text fields and manual establishment of field mappings, lacking automated verification and early error interception mechanisms. During the contract generation stage, business data and template format are highly coupled, data format conversion logic is scattered, and there is a lack of effective pre-verification mechanism before generation, resulting in high error rates, non-standard formats, and serious waste of system resources.

Method used

By implementing automatic text field parsing during the template configuration phase, dual rule validation, and pre-validation and unified data processing services during the contract generation phase, the entire process from uploading a contract template to a standardized contract document is automated and standardized. This includes automated text field parsing, pre-validation of field mapping relationships, multiple rule validations before generation, and format conversion using unified data processing services.

Benefits of technology

It significantly improves the accuracy and efficiency of template configuration, reduces the generation error rate, reduces system resource waste, improves data standardization processing capabilities and system maintainability, increases template reuse rate by about 60%, and significantly reduces generation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123070077A_ABST
    Figure CN123070077A_ABST
Patent Text Reader

Abstract

This invention discloses an automated contract document generation method and system, relating to the field of computer data processing technology. The method includes a template configuration stage and a contract generation stage: In the template configuration stage, a contract template file is received and its text fields are parsed to identify configurable text fields. Basic information configuration and field mapping relationships are received, and a first rule verification is triggered before saving. A signing configuration instruction is received, and a second rule verification is triggered before saving. In the contract generation stage, a contract generation request is received and a third rule verification is triggered. After successful verification, the target template file and field configuration information are read. Business data is dynamically read based on the field configuration. A data processing service is called to convert the data values ​​according to the rule type identifier. The converted data is then filled into the target template to generate a standardized contract document. This invention achieves full automation and standardization of the contract document generation process through dual verification in the configuration stage, pre-verification in the generation stage, and a unified data processing service, effectively reducing configuration error rates and contract rework rates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer data processing technology, and in particular to a method and system for configuring contract templates and dynamically generating contract documents. Background Technology

[0002] As businesses expand, the number and variety of contract documents increase exponentially. In traditional contract management practices, the configuration of contract templates and the generation of contract documents mainly rely on manual operations. Specifically, business personnel need to manually open the contract template file, manually identify the positions of the fields to be filled, and then manually establish the mapping relationship between business data fields and template fields. When generating the contract, they need to manually copy data from various business systems and paste it into the corresponding positions in the template, and finally manually adjust the data format to conform to the contract text specifications.

[0003] The aforementioned manually driven processing method has significant technical drawbacks: First, in the template configuration stage, due to the lack of automated parsing methods for template text fields, field recognition relies entirely on human judgment, which is not only inefficient but also prone to field omissions or mapping misalignments. Furthermore, the existing system does not have an effective automated verification mechanism before configuration saving, resulting in configuration errors often not being discovered until the contract generation or even signing stage, leading to extremely high error correction costs. Second, in the contract generation stage, business data and template formats are highly coupled, and the data formats of different business systems vary greatly. The existing solution lacks a unified data format conversion service, requiring each business system to handle format adaptation independently, resulting in chaotic data formats and low standardization in contract files. Third, the existing solution typically only performs post-contract review during the contract approval or archiving stage, without setting up a pre-contract verification mechanism. This makes it impossible to intercept abnormal situations such as missing data, invalid templates, or business rule conflicts before entering the generation process, leading to frequent invalid generation operations and serious waste of system resources.

[0004] Therefore, there is an urgent need for a contract document generation solution that can automate contract template parsing, perform layered verification during the configuration phase, perform pre-generation verification, and convert data formats uniformly, in order to solve the technical problems of lagging configuration error detection, fragmented data format processing, and lack of effective interception mechanisms before generation in existing technologies. Summary of the Invention

[0005] The technical problem this invention aims to solve is that in the existing contract document generation process, template configuration relies on manual identification of text fields and manual establishment of field mappings, and the configuration process lacks automated verification and early error interception mechanisms; in the contract generation stage, business data and template format are highly coupled, data format conversion logic is scattered, and there is a lack of effective pre-verification mechanism before generation, resulting in a high error rate, non-standard format, and serious waste of system resources in contract document generation.

[0006] To address the aforementioned technical problems, this invention provides a method for automatically generating contract documents, comprising a template configuration stage and a contract generation stage. Through dual rule verification in the configuration stage, pre-verification in the generation stage, and unified data processing services, the entire process from uploading the contract template to outputting standardized contract documents is automated and standardized.

[0007] During the template configuration phase, the system first receives the contract template file and performs text field parsing to identify the configurable text fields within it. This text field parsing refers to the system automatically identifying pre-defined data areas to be filled in the contract template, rather than relying on manual line-by-line searching. Preferably, the text field parsing can be based on preset marking rules using regular expression matching on the contract template file. For example, it can identify ${field name} format placeholders in the template file and use regular expressions to traverse the entire document to extract configurable text fields. Alternatively, the text field parsing can also be based on traversing and identifying built-in form fields in the document. For example, for PDF template documents, the system calls the `PdfStamper.getAcroFields()` method of the `itextpdf` library to traverse the form field nodes in the document, using the form field name as the field identifier to extract the configurable text fields and their position indexes within the document. Through these automated parsing methods, the field location process, which originally relied on manual identification, is transformed into an algorithmic identification process executed by the system, significantly improving the efficiency and accuracy of template configuration and fundamentally reducing the risk of field omissions due to human error.

[0008] After completing text field parsing, the system receives and saves the basic information configuration and field mapping relationships for the configurable text fields. The field mapping relationship here refers to establishing a one-to-one or one-to-many association between business data fields and configurable text fields in the template, enabling subsequent generation stages to automatically retrieve data based on this mapping relationship. Before saving the template configuration, the system triggers a first rule check. The first rule check includes at least one of field mapping integrity check, required field check, and format compliance check. Specifically, the field mapping integrity check verifies whether all configurable text fields have established field mapping relationships to prevent unmapped "orphan fields"; the required field check verifies whether required fields in the basic information configuration are filled to prevent missing key information; and the format compliance check verifies whether the target field type in the field mapping relationship matches the preset type of the configurable text field, for example, preventing the mapping of string-type business fields to a preset numeric-type monetary text field. By performing the above first rule check before saving, early interception of configuration errors is achieved, shifting the error discovery node from traditional post-event review to the moment of configuration saving, significantly reducing the probability of incorrect configuration taking effect.

[0009] Further, after the template configuration is completed, the system enters the contract configuration phase. The system receives a contract configuration instruction, which includes the imported template identifier and contract order adjustment information. The contract order adjustment information is used to define the signing order or parallel relationship in a multi-party scenario. Before saving the contract configuration, the system triggers a second rule check. The second rule check includes at least one of a party logic check and a contract order conflict check. The party logic check verifies whether the qualifications and signing permissions of each party meet preset conditions, such as whether the party has a legitimate entity identifier and whether it exists in the list of authorized parties. The contract order conflict check verifies whether the adjusted contract order has circular dependencies or logical conflicts, such as preventing a deadlock situation where Party A must sign Party B first, and Party B must sign Party A first. By performing the second rule check before saving the contract configuration, the system ensures that the contract process is logically self-consistent at the configuration level, avoiding subsequent contract flow blockages caused by incorrect contract order settings.

[0010] During the contract generation phase, the system receives a contract generation request and triggers a third rule verification based on the request. This third rule verification includes template validity verification, data integrity verification, and business rule compliance verification. Specifically, template validity verification checks whether the target template file exists and whether the corresponding template configuration is effective, preventing generation failure due to accidental template deletion or ineffective configuration. Data integrity verification checks whether the business data corresponding to the contract generation request meets the field mapping requirements in the domain configuration information, i.e., whether the required business data has been fully provided. Business rule compliance verification checks whether the business data meets preset business rule thresholds, such as whether the contract amount exceeds the authorized limit or whether the signing date is within the validity period. It is worth noting that the third rule verification differs fundamentally from the first and second rule verifications in terms of timing and object: the first and second rule verifications operate during the configuration phase, focusing on verifying "whether the configuration is correct"; the third rule verification operates during the generation phase, focusing on verifying "whether the current data is available." By performing a third rule check before entering the actual generation process, the system can intercept abnormal situations such as template failure, missing data, or business rule conflicts before data is filled, avoiding the occupation of system computing resources by invalid generation operations and reducing the rework rate after generation.

[0011] After successful verification, the system reads the target template file and corresponding domain configuration information based on the contract generation request, and dynamically reads business data based on the domain configuration information. Dynamic reading here refers to the system automatically retrieving data from the corresponding business data source according to the field mapping relationship, rather than manual copying and pasting. Subsequently, the system calls a preset data processing service to convert the data value format according to the rule type identifier corresponding to the business data. Preferably, the data processing service calls the corresponding format conversion strategy according to the rule type identifier. The format conversion strategy includes at least one of the following: amount format conversion strategy, date format conversion strategy, encoding conversion strategy, and custom format conversion strategy. For example, when the rule type identifier indicates that the current data is of amount type, the amount format conversion strategy is called to convert the original value into a standard amount format with thousands separators; when the rule type identifier indicates that the current data is of date type, the date format conversion strategy is called to uniformly convert the heterogeneous date formats of various business systems into the date format required by the contract text. Through the rule type identifier-driven strategy-based conversion mechanism, the format conversion logic scattered in various business systems is converged into a unified data processing service, achieving decoupling between business data and template format.

[0012] Furthermore, the format conversion includes: receiving the original data value and its corresponding rule type identifier; matching the rule type identifier with preset conversion rules to convert the original data value into a standardized data value that meets the target format requirements. For example, for a contract amount field, the internal code of the business system can first be converted into a standard currency code through an encoding conversion strategy, and then the numerical format can be formatted through an amount format conversion strategy to finally obtain a standardized contract amount text. Through the flexible combination and layered processing of conversion rules, adaptation to complex data format requirements is achieved, improving the flexibility and scalability of format conversion.

[0013] In this embodiment, the system's preset conversion rules cover 33 format conversion strategies, including but not limited to: direct display of original value, date formatting (YYYY-MM-DD), extraction of year / month / date from date, formatting numerical values ​​to integers, formatting with thousands separators, formatting with two decimal places, conversion of amounts to uppercase, capitalization of year / month / date, conversion of province / city / district codes to Chinese, conversion of repayment methods to Chinese, date and time formatting, generation of ordered numbers, retrieval of current time, generation of verification codes, calculation of days remaining until a specified date, and splitting lowercase amounts by digit (cents, jiao, yuan, tens, hundreds, thousands, ten thousands, hundreds of thousands, millions, tens of millions, hundreds of millions, billions, etc.). Based on the rule type identifier, the system calls the corresponding format conversion strategy through preset branch mapping logic. Each strategy is independent and can be flexibly expanded according to business needs.

[0014] Finally, the system fills the target template file with the converted data to generate a standardized contract document.

[0015] Furthermore, to achieve three-layer decoupling of template files, domain configuration information, and business data, the template configuration stage and the contract generation stage are decoupled and associated through configuration identifiers. In the contract generation stage, the system reads the corresponding domain configuration information based on the configuration identifier in the contract generation request. The domain configuration information includes the basic information configuration, field mapping relationships, and contract configuration information. Preferably, the configuration identifier is a combination of a template ID and a configuration serial number, where the template ID serves as the unique primary key identifier for the contract template, and the configuration serial number distinguishes different configuration instances of the same template. Through indirect association via configuration identifiers, the template file itself does not need to store any business data or mapping logic, the domain configuration information does not need to be embedded in the template file, and the business data is stored independently in each business system. These three elements are dynamically aggregated during the generation stage through configuration identifiers, thereby achieving separation of physical storage and logical association, significantly improving the system's maintainability and scenario adaptability.

[0016] The beneficial effects of this invention include: Early interception of configuration errors: By automatically parsing text fields and performing first and second rule checks during the template configuration stage, the error detection node is moved from the traditional post-event review to the moment the configuration is saved, achieving early interception of configuration errors. The error detection node forward shift rate reaches 100%, which greatly improves the accuracy and reusability of template configuration, and increases the template reusability rate by about 60%.

[0017] Pre-generation exception interception: Through third-rule verification during the contract generation stage, template failure, missing data, or business rule conflicts are intercepted before data filling, avoiding the occupation of system resources by invalid generation operations. The invalid generation interception rate is about 15%-20%, reducing the rework rate after generation.

[0018] Data and template decoupling: By using a unified data processing service and a rule type identifier-driven format conversion strategy, the scattered format conversion logic is converged into a strategy-based service, which decouples business data from template formats and improves data standardization processing capabilities. The system supports a total of 33 format conversion strategies, which can cover the contract text format requirements of multiple business scenarios such as finance and bills.

[0019] The architecture is scalable: By using configuration identifiers, template files, domain configuration information and business data are decoupled into three layers. When adding new contract scenarios in the future, only the configuration identifier and the corresponding domain configuration information need to be added. There is no need to modify the template files or the core logic of the data processing service, which reduces maintenance costs.

[0020] Highly efficient generation: Actual tests show that after adopting this solution, the average time to generate a single contract document is about 2-3 seconds (excluding signatures), which is significantly more efficient than the traditional manual generation method.

[0021] This invention also provides an automated contract document generation system, including a template configuration module, a contract generation module, and a data processing service module. The template configuration module is used to perform the aforementioned template configuration stage; the contract generation module is used to perform the aforementioned contract generation stage; and the data processing service module is used to perform the aforementioned format conversion operation.

[0022] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the contract document automatic generation method described above. Attached Figure Description

[0023] Figure 1 This is a swimlane flowchart of a contract document automated generation method according to an embodiment of the present invention, showing the interaction flow between the web client, the business module, and the contract module in the template configuration stage, the signing configuration stage, and the contract generation stage.

[0024] Figure 2 This is a system architecture diagram of an embodiment of the present invention, showing the calling relationship between the Web client, the business module layer, the contract template configuration module, and the data processing service layer. Detailed Implementation

[0025] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0026] I. System Overall Architecture like Figure 1 As shown, the automated contract document generation system in this embodiment involves three interactive entities: a web interface, a business module, and a contract module. The web interface serves as the user interface, receiving user input and displaying processing results; the business module acts as a general service layer, providing basic capabilities such as file uploading and template querying; and the contract module, as the core processing layer, carries key logic such as text field parsing, configuration saving, rule validation, and contract generation.

[0027] The system's overall operation is divided into three main phases: template configuration, contract configuration, and contract generation. The template configuration and contract configuration phases together constitute the system's configuration period, while the contract generation phase constitutes the system's runtime period. The configuration and runtime periods are decoupled through configuration identifiers, ensuring that template files, domain configuration information, and business data are physically independent and dynamically aggregated only during the generation phase using configuration identifiers.

[0028] like Figure 2 As shown, the system architecture, from top to bottom, includes: a web interface (user interaction layer), a business module layer (financing business module, bill business module, and other business modules), a contract template configuration module (template management module, contract configuration module, and format conversion module), and a data processing service layer (unified format conversion service). Each business module interacts with the contract template configuration module through a standard interface. The data processing service layer connects downwards to various business data sources and upwards to provide standardized data for contract generation.

[0029] II. Template Configuration Stage Step S101: Upload the contract template file.

[0030] Users upload contract template files via a web interface, which then submits the files to the general file upload service of the business module. After storing the file, the general file upload service returns a file identifier (such as a file path or file ID) to the web interface. The contract template file can be a PDF form or other document format that supports text field marking. In this embodiment, the contract template file is in PDF format, stored on a file server, and the file identifier is a combination of directory path and filename. A UUID is used to ensure the filename is globally unique, and an MD5 checksum is returned for integrity verification.

[0031] Step S102: Text field parsing.

[0032] The web client initiates a text field parsing request based on the returned file identifier. Upon receiving this request, the contract module parses the contract template file to identify configurable text fields. In this embodiment, the text field parsing is based on a traversal of the PDF document's built-in form fields: the system calls the `PdfStamper.getAcroFields()` method of the `itextpdf` library to traverse the `AcroFields` objects in the PDF document, extracting the names of each form field as the field identifiers for the configurable text fields, and recording the position index of each form field in the document. Alternatively, for template documents marked with `${field name}` placeholders, the system can also traverse the entire document using regular expressions to extract all matching items as configurable text fields. Through these automated parsing methods, the field location process, which originally relied on manual identification, is transformed into an algorithmic identification process executed by the system.

[0033] Step S103: Configure basic information and save field mapping relationships.

[0034] After completing text field parsing, the system receives and saves the basic information configuration and field mapping relationships for the configurable text fields. These field mapping relationships establish a one-to-one or one-to-many association between business data fields and configurable text fields in the template. Before saving the template configuration, the system triggers a first rule check. This first rule check includes: field mapping integrity check (verifying whether all configurable text fields have established field mapping relationships; if any text fields are not mapped, saving is blocked and a prompt is displayed); mandatory field check (verifying whether mandatory fields in the basic information configuration are filled; if any are missing, saving is blocked and a prompt is displayed); and format compliance check (verifying whether the target field type in the field mapping relationship matches the preset type of the configurable text field; if the types do not match, saving is blocked and a prompt is displayed). After successful verification, the configuration data is saved to a separate database table in the domain configuration information layer.

[0035] Step S104: Contract configuration.

[0036] After the template configuration is complete, the system enters the contract configuration phase. The system receives a contract configuration instruction, which includes the imported template identifier and contract order adjustment information. The contract order adjustment information is used to define the signing order in multi-signatory scenarios. Before saving the contract configuration, the system triggers a second rule verification. The second rule verification includes: signatory logic verification, verifying whether the qualifications of each signatory party are legal and whether they exist in the authorized list; contract order conflict verification, verifying whether the adjusted contract order has circular dependencies to prevent deadlock; contract permission verification, verifying whether the contract permissions of each party meet preset conditions (such as real-name authentication, signing quota, etc.); and archiving party constraint verification, verifying whether the last signatory has been configured as an archiving party. After the verification passes, the contract configuration is saved to the contract configuration layer.

[0037] III. Contract Generation Stage Step S201: Receive the contract generation request and trigger the third rule verification.

[0038] The system receives a contract generation request and triggers a third rule verification based on the request. This third rule verification includes: template validity verification (verifying the existence of the target template file and the effectiveness of the corresponding template configuration); data integrity verification (verifying whether the business data corresponding to the contract generation request meets the field mapping requirements in the domain configuration information); and business rule compliance verification (verifying whether the business data meets preset business rule thresholds, such as whether the contract amount exceeds the authorized limit or whether the signing date is within the validity period). If any verification item fails, the generation process is blocked and an error message is returned.

[0039] Step S202: Read the target template file and domain configuration information.

[0040] After the verification is passed, the system reads the corresponding domain configuration information according to the configuration identifier (template ID + configuration serial number) in the contract generation request, including basic information configuration, field mapping relationships and signing configuration information. At the same time, the target template file is read.

[0041] Step S203: Dynamically read service data.

[0042] Based on the field mapping relationship in the domain configuration information, the system automatically dynamically reads service data from the corresponding service data source. The service data is stored in independent service tables of each service system, and the system dynamically pulls the data through a REST API or direct database connection.

[0043] Step S204: Format conversion and contract generation.

[0044] The system invokes a preset data processing service to perform format conversion on the data value according to the rule type identifier corresponding to the service data. The system presets 33 format conversion strategies, and matches the corresponding conversion rule through the rule type identifier. For example: When the rule type identifier is a date formatting type, the original date string "2025-06-04T15:46:00" is converted to "2025-06-04"; When the rule type identifier is a capitalized year type, "2025" is converted to "二〇二五"; When the rule type identifier is a thousands separator formatting type, "1234567.89" is converted to "1,234,567.89"; When the rule type identifier is a capitalized amount type, "1234567.89" is converted to "壹佰贰拾叁万肆仟伍佰陆拾柒元捌角玖分"; When the rule type identifier is a municipal level conversion type, the code "100000" is converted to "Beijing City".

[0045] After the conversion is completed, the system fills the standardized data values into the corresponding text fields of the target template file to generate a standardized contract file.

[0046] IV. Three-layer decoupled storage To realize three-layer decoupling of the template file, domain configuration information and service data, this embodiment adopts the following physical storage solution: Template file layer: Contract template files are stored in PDF format on the file server (OSS), and template metadata is stored in the database table (t_business_contract_template); Domain configuration information layer: Basic information configuration, field mapping relationships and contract configuration information are associated through template IDs and stored in database tables (t_business_contract_template_config, t_business_contract_template_signatory); Business data layer: Each business data is stored independently in the business tables of each business system (such as t_business_finance), and is associated through template ID. During the generation stage, it is dynamically pulled through REST API or direct database connection.

[0047] Through the above three-layer decoupled storage, the template file itself does not need to store any business data or mapping logic, and the domain configuration information does not need to be embedded in the template file. The business data is stored independently. The three are only dynamically aggregated through configuration identifiers during the generation stage, which significantly improves the maintainability and scenario adaptability of the system.

[0048] V. Quantitative Technique Effects Actual tests show that after adopting the solution of this invention: The error detection node has been moved forward by 100%, and error detection has changed from "rework after generation" to "real-time verification during configuration". The unified data processing service supports 33 format conversion strategies, covering multiple business scenarios such as finance and bills; The average time to generate a single contract document is approximately 2-3 seconds (excluding signing and sealing). The third rule verification process intercepts invalid requests in approximately 15%-20% of the total. Template reuse rate increased by approximately 60%; The error rate in signatures has been reduced by approximately 90%.

[0049] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for automatically generating contract documents, characterized in that, The process includes a template configuration phase and a contract generation phase. The template configuration phase is used to complete the text field parsing, field mapping configuration, and signing configuration of the contract template, and trigger rule validation accordingly. The contract generation phase is used to dynamically read business data based on the validated template configuration and field configuration information, and generate standardized contract documents after unified format conversion. The template configuration phase includes: S1, Receive a contract template file, parse the text fields of the contract template file, and identify the configurable text fields in the contract template file; S2, Receive and save the basic information configuration and field mapping relationship for the configurable text field, trigger the first rule verification before saving, and save the template configuration if the verification passes; S3, Receive the contract configuration instruction, which includes the imported template identifier and contract order adjustment information. Trigger the second rule verification before saving the contract configuration. If the verification passes, save the contract configuration. The contract generation phase includes: S4, Receive a contract generation request, and trigger a third rule verification based on the contract generation request. The third rule verification includes template validity verification, data integrity verification, and business rule compliance verification. S5. After the verification is passed, the target template file and the corresponding domain configuration information are read according to the contract generation request, and the business data is dynamically read based on the domain configuration information. S6, invoke the preset data processing service, convert the data value format according to the rule type identifier corresponding to the business data, fill the converted data into the target template file, and generate a standardized contract file.

2. The method for automatically generating contract documents according to claim 1, characterized in that, In step S1, the text field parsing includes: performing regular expression matching on the contract template file based on preset tagging rules, or performing traversal recognition based on the document's built-in form fields, to extract the configurable text fields and their field identifiers.

3. The method for automatically generating contract documents according to claim 1, characterized in that, In step S2, the first rule verification includes at least one of the following: Field mapping integrity verification: Verify whether field mapping relationships have been established for all configurable text fields; Required field validation: Verifies whether the required fields in the basic information configuration have been filled in. Format compliance verification: Verify whether the target field type in the field mapping relationship matches the preset type of the configurable text field.

4. The method for automatically generating contract documents according to claim 1, characterized in that, In step S3, the second rule verification includes at least one of the following: The contracting party logic is validated to ensure that the legal status and signing authority of each party meet the preset conditions. Signing order conflict check: Check whether the adjusted signing order has circular dependencies or logical conflicts.

5. The method for automatically generating contract documents according to claim 1, characterized in that, In step S4, the third rule verification includes: Template validity verification: Verify whether the target template file exists and whether the corresponding template configuration has taken effect; Data integrity verification: Verify whether the business data corresponding to the contract generation request meets the field mapping requirements in the domain configuration information; Business rule compliance verification verifies whether the business data meets the preset business rule thresholds.

6. The method for automatically generating contract documents according to claim 1, characterized in that, In step S6, the data processing service includes: The corresponding format conversion strategy is invoked based on the rule type identifier. The format conversion strategy includes at least one of the following: amount format conversion strategy, date format conversion strategy, encoding conversion strategy, and custom format conversion strategy.

7. The method for automatically generating contract documents according to claim 1, characterized in that, In step S6, the format conversion includes: Receive the raw data value and the corresponding rule type identifier; The original data value is format-converted according to the rule type identifier and the preset conversion rule to obtain a standardized data value that meets the target format requirements.

8. The method for automatically generating contract documents according to claim 1, characterized in that, The template configuration stage and the contract generation stage are decoupled and associated through configuration identifiers; During the contract generation phase, the corresponding domain configuration information is read based on the configuration identifier in the contract generation request. The domain configuration information includes the basic information configuration, field mapping relationships, and contract configuration information.

9. A contract document automated generation system, characterized in that, include: The template configuration module is used to execute the template configuration stage as described in any one of claims 1-8; The contract generation module is used to perform the contract generation stage as described in any one of claims 1-8; A data processing service module for performing the format conversion as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-8.