Contract template intelligent generation method and device
By using the field type identification model to identify the target field type in the contract template and generate a contract template, the problems of low efficiency and poor compliance in the existing technology are solved, and efficient and accurate contract template generation and management are achieved.
Patent Information
- Application Number
- CN202411665794.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, the configuration efficiency of contract templates is low and the compliance is poor, which makes the configuration process time-consuming and dependent on a lot of manpower, and the field configuration is difficult to manage, resulting in insufficient compliance and intelligent accuracy.
By obtaining the contract text to be generated, the field type identification model uses the field type identification model to identify the target field type based on the boot symbol and preset fields, and generate a contract template, lowering the configuration threshold, simplifying operations, and improving compliance and intelligent accuracy.
It greatly reduces the workload of manual operations, improves the accuracy of contract template generation, and reduces the error of human judgment. It is suitable for various types of contract template generation, has strong flexibility, and improves the performance and scalability of the protocol system.
Smart Images

Figure CN119557441A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for intelligently generating a contract template. Background Art
[0002] With the rapid development of Internet technology, more and more companies use contract templates to generate service contracts and provide electronic signing capabilities in order to save contract drafting and approval time and improve contract signing efficiency.
[0003] However, the use of the electronic signing function requires the configuration of contract templates in advance, including contract content, field configuration, and signature rules. The contract template configuration process is very time-consuming. Different regions and different business needs require the development of new contract templates, which requires a lot of manpower support. In addition, due to different understandings of field configuration, configuration personnel often abuse or create fields at will, making it difficult to manage fields and ensure compliance.
[0004] Therefore, in the current context, we need a new technical solution to solve the above problems. This solution needs to use intelligent technology to lower the configuration threshold and simplify the configuration operation to improve the performance and scalability of the protocol system. At the same time, it is also necessary to strengthen the control of fields, improve compliance and intelligent accuracy, and reduce reliance on manual intervention. Summary of the invention
[0005] The present invention provides a method and device for intelligently generating contract templates, which are used to solve the defects of low efficiency and poor compliance of contract template configuration in the prior art, and use intelligent technology to lower the configuration threshold, simplify configuration operations, and improve the performance and scalability of the protocol system. At the same time, it also strengthens the management and control of fields, improves the accuracy of compliance and intelligence, and reduces dependence on manual intervention.
[0006] The present invention provides a method for intelligently generating a contract template, comprising: obtaining a contract text to be generated, the contract text to be generated comprising a guide symbol, the guide symbol being used to guide the text position of a target field to be filled in; obtaining a target field type recognition result by using a field type recognition model according to the contract text to be generated and a preset field previously classified; wherein the field type recognition model is obtained by training based on a contract training text and a field label corresponding to the contract training text, and the field type recognition model performs field type recognition on the guide symbol based on the preset field previously classified to obtain a target field type recognition result; and generating a contract template according to the target field type recognition result.
[0007] According to a method for intelligently generating contract templates provided by the present invention, the contract text to be generated also includes a markup language tag, which is used to mark the logical structure and layout of the document; based on the contract text to be generated and the preset fields previously classified, a field type recognition model is used to obtain a target field prediction result, including: segmenting the contract text to be generated according to the markup language tags to obtain text fragments; for each text fragment, in combination with the preset fields previously classified, a field type recognition model is used to obtain a target field type recognition result.
[0008] According to a method for intelligently generating contract templates provided by the present invention, for each text fragment, in combination with the preset fields previously classified, a field type recognition model is used to obtain a target field type recognition result, including: for each text fragment, according to the preset fields previously classified, a preset field of the same category is selected, and the selected preset field of the same category and the text fragment are combined with a preset prompt to generate a corresponding prompt request; the next category of preset fields is selected again according to the preset fields previously classified, and the reselected preset field of the same category and the text fragment are combined with the preset prompt to generate a corresponding prompt request, until all types of preset fields generate corresponding prompt requests with the text fragment and the preset prompt; using multi-threading, the generated multiple prompt requests are input into the field type recognition model, the field type recognition model recognizes the guide symbol of the text fragment, and uses natural language processing technology to associate and evaluate the selected type of preset field with the guide symbol to obtain a target field type recognition result.
[0009] According to a method for intelligently generating contract templates provided by the present invention, before obtaining a target field type recognition result for each text fragment by combining previously classified preset fields and using a field type recognition model, the method includes: obtaining corresponding preset fields according to the contract text to be generated; and classifying the obtained preset fields according to field attribute characteristics.
[0010] According to a method for intelligently generating a contract template provided by the present invention, the contract text to be generated is segmented to obtain text fragments according to the markup language tags previously annotated on the contract text to be generated, including: scanning the contract text to be generated line by line to find the text position of the markup language tags; and segmenting the contract text to be generated to obtain text fragments according to the text position of the markup language tags found.
[0011] According to a method for intelligently generating a contract template provided by the present invention, a contract template is generated according to a target field type recognition result, including: according to the target field type recognition result, each preset field of the field type corresponding to each guide symbol is taken as an option in a list to generate a corresponding list; and the list is positioned at the corresponding guide symbol to obtain a contract template.
[0012] According to a method for intelligently generating a contract template provided by the present invention, the contract text to be generated is obtained, including: obtaining the original text of the contract to be generated; parsing the original text, and traversing the parsed original text to find the text position of the target field to be filled in the parsed original text; inserting a guide symbol at a corresponding position in the parsed original text according to the text position of the target field to be filled in the parsed original text obtained by the search, to obtain a marked text; marking each paragraph and sentence of the marked text with a corresponding markup language tag, and according to the markup language tag, storing the corresponding marked text in a template previously created based on a preset markup language format, to obtain the contract text to be generated.
[0013] The present invention also provides a device for intelligently generating contract templates, comprising: a text acquisition module, for acquiring a contract text to be generated, wherein the contract text to be generated includes a guide symbol, and the guide symbol is used to guide the text position of a target field to be filled in; a field type recognition module, for obtaining a target field type recognition result by using a field type recognition model according to the contract text to be generated and a preset field previously classified; wherein the field type recognition model is obtained by training based on a contract training text and field labels corresponding to the contract training text, and the field type recognition model performs field type recognition on the guide symbol based on the preset field previously classified to obtain a target field type recognition result; and a template generation module, for generating a contract template according to the target field type recognition result.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for intelligently generating contract templates as described above is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for intelligently generating contract templates.
[0016] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for intelligently generating contract templates.
[0017] The intelligent contract template generation method and device provided by the present invention obtain the contract text to be generated and the preset fields of the previous classification, and use the field type recognition model to obtain the target field type recognition result, which greatly reduces the workload of manual operation. At the same time, the model is trained to more accurately identify the target field type corresponding to the guide symbol, thereby improving the accuracy of contract template generation and reducing errors in human judgment. Therefore, target field type recognition and template generation are performed according to different contract texts to be generated. It is suitable for various types of contract template generation, has strong flexibility, and uses intelligent technology to lower the configuration threshold, simplify configuration operations, and improve the performance and scalability of the protocol system. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 This is one of the flow charts of the intelligent generation method of contract templates provided by the present invention; Figure 2 This is the second flow chart of the method for intelligently generating a contract template provided by the present invention; Figure 3 It is a structural schematic diagram of the contract template intelligent generation device provided by the present invention; Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] Figure 1 : is a flow chart of the method for intelligently generating a contract template provided by the present invention, the method comprising: S11, obtaining a contract text to be generated, where the contract text to be generated includes a guide symbol, where the guide symbol is used to guide the text position of the target field to be filled in; S12, according to the contract text to be generated and the preset fields of the previous classification, using the field type recognition model, obtain the target field type recognition result; wherein the field type recognition model is trained based on the contract training text and the field labels corresponding to the contract training text, and the field type recognition model performs field type recognition on the guide symbol based on the preset fields of the previous classification to obtain the target field type recognition result; S13, generating a contract template according to the target field type identification result.
[0022] It should be noted that the step numbers "S1N" in this manual do not represent the order of the method for intelligently generating contract templates. Figure 2 The present invention describes the intelligent generation method of contract templates.
[0023] Step S11, obtaining the contract text to be generated, wherein the contract text to be generated includes a guide symbol, and the guide symbol is used to guide the text position of the target field to be filled in.
[0024] It should be noted that the contract text to be generated also includes markup language tags, which are used to mark the logical structure and layout of the document.
[0025] Specifically, obtaining the contract text to be generated includes: obtaining the original text of the contract to be generated; parsing the original text, and traversing the parsed original text to find the text position of the target field to be filled in the parsed original text; inserting a guide symbol at the corresponding position in the parsed original text according to the text position of the target field to be filled in the parsed original text obtained by the search, to obtain marked text; marking each paragraph and sentence of the marked text with a corresponding markup language tag, and according to the markup language tag, storing the corresponding marked text in a template previously created based on a preset markup language format, to obtain the contract text to be generated.
[0026] It should be noted that by parsing the original text to deeply understand the structure and content of the text and accurately find the location of the target field to be filled in, errors that may be caused by blindly inserting guide symbols are avoided, saving time for manual search and marking, and improving the efficiency of contract generation. Each paragraph and sentence is marked with the corresponding markup language tag and stored in the template according to the markup language tag, ensuring the format specifications of the contract text and the accuracy of the content. At the same time, the contract format or content can be adjusted by adjusting the definition of the template or markup language tag to meet the requirements of different contract template generation, which has strong scalability.
[0027] In addition, the guide symbols can be set according to the actual contract template requirements, such as "[ ]", "_", etc., and no further restrictions are made here.
[0028] It should be noted that the markup language tag can be determined according to the actual preset markup language format involved. For example, if the actual preset markup language format involved is the Hyper Text Markup Language (HTML) format, then the markup language tag includes the HTML tag. The HTML tag consists of keywords enclosed in angle brackets, such as,,, (paragraph), <h1> (first-level title), etc., where: the tag defines the entire HTML document; the tag contains meta information about the document, such as title, style sheet reference, script reference, etc.; the tag contains the visible content of the web page, such as text, images, links, etc.;< / h1> <h1> arrive< / h1> <h6>Tags are used to define different levels of headings; Tags are used to define paragraphs. In addition, tags usually appear in pairs, with a start tag and an end tag, such as is the start tag, is the closing tag, and the content between them is a paragraph.
[0029] For example, if the markup text is "Preferred housing location: __________", the corresponding HTML tag is "Preferred housing location:" Field location "; For example, the marked text is "Name":__________", the corresponding HTML tag is "Name: Field Name "; For example, the markup text is "payment amount [ ]", the corresponding HTML tag is "payment amount [ Field Payment Amount ]; For another example, the marked text is "[This agreement is signed in [] month, other conditions [] ]", and the corresponding HTML tag is "[This agreement is signed in [] month, other conditions [] ]" Field Time 】month, other conditions
Field condition p>
[0030] In an optional embodiment, after storing the corresponding markup text in a template previously created based on a preset markup language format according to the markup language tag, it includes: triggering style adjustment and / or style rendering of the guide symbol according to the received format adjustment request, etc. The specific style and style can be set according to actual design requirements and are not further limited here.
[0031] Step S12, according to the contract text to be generated and the preset fields of the previous classification, the field type recognition model is used to obtain the target field type recognition result; wherein the field type recognition model is trained based on the contract training text and the field labels corresponding to the contract training text, and the field type recognition model performs field type recognition on the guide symbol based on the preset fields of the previous classification to obtain the target field type recognition result.
[0032] In this embodiment, based on the contract text to be generated and the preset fields previously classified, a field type recognition model is used to obtain a target field prediction result, including: segmenting the contract text to be generated according to the markup language tags to obtain text fragments; for each text fragment, in combination with the preset fields previously classified, the field type recognition model is used to obtain a target field type recognition result.
[0033] It should be noted that segmenting the markup language tags before identification makes the features of each text segment more concentrated, which helps to improve the accuracy of target field type identification, thereby more accurately identifying the target field type corresponding to the guide symbol. At the same time, the model can be trained to accurately locate the target field and reduce the error of human judgment. The field type identification model can use a large language model such as ChatGPT, which can be selected according to actual design requirements and is not further limited here.
[0034] Specifically, according to the markup language tags previously annotated on the contract text to be generated, the contract text to be generated is segmented to obtain text fragments, including: scanning the contract text to be generated line by line to find the text position of the markup language tags; according to the text position of the markup language tags found, the contract text to be generated is segmented to obtain text fragments.
[0035] Furthermore, when the contract text to be generated is segmented according to the text position of the markup language tag found, it includes: taking the beginning of the contract text to be generated as the segmentation point; starting from the segmentation point, checking the contract text to be generated character by character, and counting the number of checked characters; if there is no markup language tag in the current number of checked characters, the contract text to be generated is divided based on the number of checked characters and the preset text length; if there is a markup language tag in the current number of checked characters, the contract text to be generated is divided based on determining that the current number of checked characters is within the target range of the preset text number.
[0036] It is worth noting that the preset text length can be set according to the actual contract text to be generated and the actual design requirements, for example, it can be 2000 characters, etc., and no further limitation is made here.
[0037] In an optional embodiment, after the contract text to be generated is divided, the method further includes: adjusting the divided text segments based on a preset contract clause rule; wherein the contract clause rule is used to limit the preset contract clauses to be in the same text segment. It should be noted that by limiting the preset contract clauses to be in the same text segment, the contract clauses are made clearer, which helps to quickly and accurately find specific clauses and reduce misunderstandings and ambiguities that may be caused by the dispersion of clauses.
[0038] In addition, refer to Figure 2 For each text segment, combined with the preset fields previously classified, the field type recognition model is used to obtain the target field type recognition result, including: for each text segment, according to the preset fields previously classified, the preset fields of the same category are selected, and the selected preset fields of the same category and the text segment are combined with the preset prompt to generate a corresponding prompt request; according to the preset fields previously classified, the next category of preset fields are selected again, and the reselected preset fields of the same category and the text segment are combined with the preset prompt to generate a corresponding prompt request, until all types of preset fields generate corresponding prompt requests with the text segment and the preset prompt; using multi-threading, the generated multiple prompt requests are input into the field type recognition model, the field type recognition model recognizes the guide symbol of the text segment, and uses natural language processing technology to associate and evaluate the selected type of preset fields with the guide symbol to obtain the corresponding target field type recognition result.
[0039] It should be noted that for each text segment, the same category of preset fields are entered each time a request is made to avoid difficulties in identifying words with similar meanings, thereby effectively avoiding the problem of incorrect field type identification. At the same time, the control of fields is strengthened. According to the output target field type identification results, the guide symbols are associated with the target fields of the corresponding types, improving the accuracy of compliance and intelligence and reducing the reliance on manual intervention.
[0040] In addition, by using multi-threading to send prompt requests to the field type recognition model and perform field type recognition concurrently, efficiency can be significantly improved and processing time can be shortened, thereby better meeting the needs of processing large amounts of data.
[0041] In addition, the target field type recognition result includes the text segment and the target field type label corresponding to the guide symbol in the text segment. When the preset field of the selected type is associated with the guide symbol for evaluation, if the recognition is consistent, the preset field of this type is used as the target field type label corresponding to the guide symbol.
[0042] In an optional embodiment, for each text fragment, in combination with the previously classified preset fields, using the field type recognition model, before obtaining the target field type recognition result, it includes: obtaining the corresponding preset fields according to the contract text to be generated; and classifying the obtained preset fields according to the field attribute characteristics.
[0043] Step S13, generating a contract template according to the target field type identification result.
[0044] In this embodiment, a contract template is generated based on the target field type recognition result, including: based on the target field type recognition result, each preset field of the field type corresponding to each guide symbol is taken as an option in the list to generate a corresponding list; the list is positioned to the corresponding guide symbol to obtain the contract template.
[0045] It should be noted that since the contract text to be generated is divided into text fragments in step S12 and the corresponding prompt requests are spliced together, a multi-threaded method is adopted to send prompt requests to the field type recognition model and perform field type recognition concurrently. Therefore, before generating a contract template based on the target field type recognition results, it also includes: splicing the target field type recognition results obtained based on each prompt request.
[0046] It should be noted that by positioning the list to the corresponding guide symbol, a drop-down list is generated for the corresponding guide symbol to facilitate subsequent response to user interaction. For example, when the user selects a specific guide symbol and triggers the corresponding interaction event, the corresponding drop-down list is displayed for the user to select the corresponding specific field from the drop-down list. This avoids possible errors in manual input by the user, improves data accuracy, makes user operation more convenient, enhances user experience, is suitable for different needs and scenarios, and has strong scalability.
[0047] In summary, the embodiment of the present invention obtains the contract text to be generated and the preset fields of the previous classification, and obtains the target field type recognition result by using the field type recognition model, which greatly reduces the workload of manual operation. At the same time, the model is trained to more accurately identify the target field type corresponding to the guide symbol, thereby improving the accuracy of contract template generation and reducing errors in human judgment. Therefore, target field type recognition and template generation are performed according to different contract texts to be generated. It is suitable for various types of contract template generation, has strong flexibility, and uses intelligent technology to lower the configuration threshold, simplify configuration operations, and improve the performance and scalability of the protocol system.
[0048] The intelligent contract template generation device provided by the present invention is described below. The intelligent contract template generation device described below and the intelligent contract template generation method described above can be referenced to each other.
[0049] Figure 3 A schematic diagram of the structure of a device for intelligently generating a contract template is shown, the device comprising: A text acquisition module 31 acquires the contract text to be generated, wherein the contract text to be generated includes a guide symbol, and the guide symbol is used to guide the text position of the target field to be filled in; The field type recognition module 32 obtains a target field type recognition result by using a field type recognition model according to the contract text to be generated and the preset fields classified in advance; wherein the field type recognition model is obtained by training based on the contract training text and the field labels corresponding to the contract training text, and the field type recognition model performs field type recognition on the guide symbol based on the preset fields classified in advance to obtain a target field type recognition result; The template generation module 33 generates a contract template according to the target field type recognition result.
[0050] In this embodiment, the text acquisition module 31 includes: an original text acquisition unit, which acquires the original text of the contract to be generated; a search unit, which parses the original text and traverses the parsed original text to find the text position of the target field to be filled in the parsed original text; a symbol insertion unit, which inserts a guide symbol at the corresponding position in the parsed original text according to the text position of the target field to be filled in the parsed original text obtained by the search, so as to obtain a marked text; a text generation unit, which marks each paragraph and sentence of the marked text with a corresponding markup language tag, and according to the markup language tag, stores the corresponding marked text in a template previously created based on a preset markup language format to obtain the contract text to be generated.
[0051] In an optional embodiment, the text acquisition module 31 further includes: after storing the corresponding markup text in a template previously created based on a preset markup language format according to the markup language tag, triggering style adjustment and / or style rendering of the guide symbol according to a received format adjustment request.
[0052] The field type identification module 32 includes: a segmentation unit, which segments the contract text to be generated according to the markup language tags to obtain text segments; a field type identification unit, which obtains the target field type identification result for each text segment by combining the preset fields previously classified and using the field type identification model.
[0053] Specifically, the segmentation unit includes: a position search subunit, which scans the contract text to be generated line by line to find the text position of the markup language tag; a segmentation subunit, which segments the contract text to be generated according to the text position of the markup language tag found, and obtains text fragments.
[0054] Furthermore, the segmentation sub-unit includes: a segmentation point determination grandson unit, which takes the beginning of the contract text to be generated as the segmentation point; a character checking grandson unit, which checks the contract text to be generated character by character starting from the segmentation point, and counts the number of checked characters; if there is no markup language tag in the current number of checked characters, the segmentation grandson unit divides the contract text to be generated based on the number of checked characters and the preset text length; if there is a markup language tag in the current number of checked characters, the segmentation grandson unit divides the contract text to be generated based on determining that the current number of checked characters is within the target range of the preset text number.
[0055] In an optional embodiment, the segmentation sub-unit also includes: an adjustment sub-unit, which, after dividing the contract text to be generated, adjusts the divided text segments based on preset contract clause rules; wherein the contract clause rules are used to limit the preset contract clauses to be located in the same text segment.
[0056] In addition, the field type identification unit includes: a field selection subunit, for each text fragment, according to the preset fields previously classified, selects the preset fields of the same category, and combines the selected preset fields of the same category and the text fragment with the preset prompt to generate a corresponding prompt request; an iterative selection subunit, re-selects the next category of preset fields according to the preset fields previously classified, and combines the re-selected preset fields of the same category and the text fragment with the preset prompt to generate a corresponding prompt request, until all types of preset fields generate corresponding prompt requests with the text fragment and the preset prompt; a field type identification subunit, using multi-threading, inputs the generated multiple prompt requests into a field type identification model, the field type identification model identifies the guide symbol of the text fragment, and uses natural language processing technology to associate and evaluate the selected type of preset field with the guide symbol to obtain the corresponding target field type identification result.
[0057] In an optional embodiment, the device further includes: a field acquisition module, which obtains corresponding preset fields according to the contract text to be generated before obtaining the target field type recognition result for each text fragment in combination with the previously classified preset fields using the field type recognition model; and a field classification module, which classifies the obtained preset fields according to field attribute characteristics.
[0058] The template generation module 33 includes: a list determination unit, which takes each preset field of the field type corresponding to each guide symbol as an option in the list according to the target field type recognition result, and generates a corresponding list; a template generation unit, which locates the list to the corresponding guide symbol to obtain a contract template.
[0059] It should be noted that the target field type recognition result includes the text segment and the target field type label corresponding to the guide symbol in the text segment. Since the contract text to be generated is divided into segment texts and spliced to generate corresponding prompt requests, a multi-threaded method is used to send prompt requests to the field type recognition model and perform field type recognition concurrently. Therefore, the device also includes: a result splicing module, which splices the target field type recognition results obtained based on each prompt request before generating a contract template based on the target field type recognition result.
[0060] To sum up, the embodiment of the present invention uses the field type recognition model to obtain the target field type recognition result according to the contract text to be generated obtained by the text acquisition module and the preset fields classified in advance, thereby greatly reducing the workload of manual operations. At the same time, the model is trained to more accurately identify the target field type corresponding to the guide symbol, thereby improving the accuracy of contract template generation and reducing errors in human judgment. Therefore, the template generation module performs target field type recognition and template generation according to different contract texts to be generated, is suitable for various types of contract template generation, has strong flexibility, and uses intelligent technology to lower the configuration threshold, simplify configuration operations, and improve the performance and scalability of the protocol system.
[0061] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the intelligent generation method of the contract template, the method comprising: obtaining the contract text to be generated, the contract text to be generated includes a guide symbol, the guide symbol is used to guide the text position of the target field to be filled in; according to the contract text to be generated and the preset field classified in advance, using the field type recognition model, obtaining the target field type recognition result; wherein the field type recognition model is obtained by training based on the contract training text and the field label corresponding to the contract training text, and the field type recognition model performs field type recognition on the guide symbol based on the preset field classified in advance to obtain the target field type recognition result; according to the target field type recognition result, generating the contract template.
[0062] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0063] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the intelligent contract template generation method provided by the above-mentioned methods, and the method includes: obtaining a contract text to be generated, the contract text to be generated includes a guide symbol, and the guide symbol is used to guide the text position of a target field to be filled in; according to the contract text to be generated and the preset fields previously classified, using a field type recognition model to obtain a target field type recognition result; wherein the field type recognition model is trained based on a contract training text and field labels corresponding to the contract training text, and the field type recognition model performs field type recognition on the guide symbol based on the preset fields previously classified to obtain a target field type recognition result; based on the target field type recognition result, a contract template is generated.
[0064] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the intelligent contract template generation method provided by the above-mentioned methods, the method comprising: obtaining a contract text to be generated, the contract text to be generated comprising a guide symbol, the guide symbol being used to guide the text position of a target field to be filled in; obtaining a target field type recognition result by using a field type recognition model based on the contract text to be generated and a preset field previously classified; wherein the field type recognition model is trained based on a contract training text and field labels corresponding to the contract training text, and the field type recognition model performs field type recognition on the guide symbol based on the preset field previously classified to obtain a target field type recognition result; and generating a contract template based on the target field type recognition result.
[0065] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0066] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention. < / h6>
Claims
1. A method for intelligently generating a contract template, characterized in that: include: Acquire a contract text to be generated, wherein the contract text to be generated includes a guide symbol, and the guide symbol is used to guide the text position of a target field to be filled in; According to the contract text to be generated and the preset fields classified in advance, a field type recognition model is used to obtain a target field type recognition result; wherein the field type recognition model is obtained by training based on the contract training text and the field labels corresponding to the contract training text, and the field type recognition model performs field type recognition on the guide symbol based on the preset fields classified in advance to obtain a target field type recognition result; A contract template is generated according to the target field type identification result.
2. The method for intelligently generating contract templates according to claim 1, characterized in that: The contract text to be generated also includes markup language tags, which are used to mark the logical structure and layout of the document; According to the contract text to be generated and the preset fields classified in advance, the field type recognition model is used to obtain the target field prediction result, including: According to the markup language tags, the contract text to be generated is segmented to obtain text segments; For each of the text segments, in combination with the previously classified preset fields, a field type recognition model is used to obtain a target field type recognition result.
3. The method for intelligently generating contract templates according to claim 2, characterized in that: For each of the text segments, combined with the previously classified preset fields, the field type recognition model is used to obtain the target field type recognition result, including: For each of the text segments, according to the preset fields previously classified, a preset field of the same category is selected, and the selected preset field of the same category and the text segment are combined with a preset prompt to generate a corresponding prompt request; Reselecting the next category of preset fields according to the previously classified preset fields, and combining the reselected preset fields of the same category and the text segment with the preset prompt word prompt to generate a corresponding prompt request, until all types of preset fields generate corresponding prompt requests with the text segment and the preset prompt word prompt; Using multi-threading, the generated multiple prompt requests are input into the field type recognition model, the field type recognition model recognizes the guide symbol of the text fragment, and uses natural language processing technology to associate and evaluate the selected type preset field with the guide symbol to obtain the target field type recognition result.
4. The method for intelligently generating contract templates according to claim 2, characterized in that: Before obtaining the target field type recognition result by using the field type recognition model for each of the text segments in combination with the previously classified preset fields, the following steps are included: According to the contract text to be generated, obtaining corresponding preset fields; The obtained preset fields are classified according to the field attribute characteristics.
5. The method for intelligently generating contract templates according to claim 2, characterized in that: According to the markup language tags previously marked on the contract text to be generated, the contract text to be generated is segmented to obtain text segments, including: Scanning the contract text to be generated line by line to find the text position of the markup language tag; According to the text position of the markup language tag found, the contract text to be generated is segmented to obtain text fragments.
6. The method for intelligently generating contract templates according to claim 1, characterized in that: Generate a contract template based on the target field type identification result, including: According to the target field type identification result, each preset field of the field type corresponding to each guide symbol is taken as an option in the list to generate a corresponding list; The list is positioned at the corresponding guide symbol to obtain the contract template.
7. The method for intelligently generating contract templates according to claim 1, characterized in that: Get the contract text to be generated, including: Obtain the original text of the contract to be generated; Parsing the original text, and traversing the parsed original text to find the text position of the target field to be filled in the parsed original text; According to the text position of the target field to be filled in the parsed original text, a guide symbol is inserted into the corresponding position of the parsed original text to obtain a marked text; Each paragraph and sentence of the marked text is marked with a corresponding markup language tag, and according to the markup language tag, the corresponding marked text is stored in a template previously created based on a preset markup language format to obtain the contract text to be generated.
8. A device for intelligently generating contract templates, characterized in that: include: A text acquisition module, which acquires the contract text to be generated, wherein the contract text to be generated includes a guide symbol, and the guide symbol is used to guide the text position of the target field to be filled in; A field type identification module, based on the contract text to be generated and the preset fields classified in advance, uses a field type identification model to obtain a target field type identification result; wherein the field type identification model is obtained by training based on the contract training text and the field labels corresponding to the contract training text, and the field type identification model performs field type identification on the guide symbol based on the preset fields classified in advance to obtain a target field type identification result; The template generation module generates a contract template according to the target field type recognition result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it implements the intelligent contract template generation method as described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the intelligent contract template generation method as described in any one of claims 1 to 7.