Automatic contract generation method, device, server, medium and product

By automatically replacing the variable identification information in the contract template, the problem of low electronic contract editing efficiency in the prior art is solved, and a method of quickly generating a contract is realized.

CN114091415BActive Publication Date: 2024-11-05BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111406776.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-24
Publication Date
2024-11-05
Estimated Expiration
2041-11-24

AI Technical Summary

Technical Problem

Existing electronic contract templates require users to manually fill in variables, resulting in a long editing time and inefficient efficiency.

Method used

Provides an automatic contract generation method, which can automatically fill variables by obtaining contract templates and edited content added by users, including variable identification information, find the target variable collection, and automatically replace variable identification information based on the context content to realize automatic filling of variables.

Benefits of technology

It saves users the time to manually fill in variables, improves the speed of contract generation, and realizes automatic contract generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114091415B_ABST
    Figure CN114091415B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device, medium and product for automatic contract generation, which can be applied to the financial field or other fields. Obtain a contract template; obtain the editing content added by the user to the contract template, the editing content includes variable identification information, the variable identification information includes a variable identifier and a description keyword of the variable used to replace the variable identification information; find the target variable set corresponding to the template type to which the contract template belongs; for each variable identification information, based on the context content of the variable identification information, obtain the candidate variable set corresponding to the variable identification information from the target variable set; for each variable identification information, based on the candidate variable set corresponding to the variable identification information, obtain the target variable with the highest similarity to the description keyword contained in the variable identification information; replace the variable identification information contained in the contract template with the corresponding target variable to obtain the contract. Thus, the purpose of automatically filling variables into the contract template is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to methods, devices, servers, media and products for automatically generating contracts. Background Art

[0002] With the rapid development of e-commerce, a large number of enterprises are increasingly inclined to sign contracts by signing electronic contracts. Currently, the template of an electronic contract is usually a large framework, for example, including fixed text and text input boxes, which requires users to manually fill in variables such as text input boxes, making the editing time of electronic contracts longer. Summary of the invention

[0003] In view of this, the present application provides a method, device, server, medium and product for automatically generating a contract.

[0004] To achieve the above objectives, this application provides the following technical solutions:

[0005] According to a first aspect of an embodiment of the present disclosure, a method for automatically generating a contract is provided, comprising:

[0006] Get a contract template;

[0007] Acquire edited content added to the contract template by a user, wherein the edited content includes variable identification information, wherein the variable identification information includes a variable identifier and a description keyword for replacing a variable in the variable identification information;

[0008] From the preset correspondence between the template type and the variable set, searching for the target variable set corresponding to the template type to which the contract template belongs, the target variable set including variables and / or calculation methods;

[0009] For each of the variable identification information, based on the context content of the variable identification information, obtaining a candidate variable set corresponding to the variable identification information from the target variable set, the candidate variable set including variables and / or calculation methods;

[0010] For each of the variable identification information, based on the candidate variable set corresponding to the variable identification information, obtaining the target variable with the highest similarity to the description keyword contained in the variable identification information;

[0011] Replace the variable identification information contained in the contract template with the corresponding target variable to obtain the contract corresponding to the contract template

[0012] According to a second aspect of an embodiment of the present disclosure, there is provided a device for automatically generating a contract, comprising:

[0013] The first acquisition module is used to acquire the contract template;

[0014] A second acquisition module is used to acquire edited content added to the contract template by a user, wherein the edited content includes variable identification information, and the variable identification information includes a variable identifier and a description keyword for replacing a variable in the variable identification information;

[0015] A search module, used to search for a target variable set corresponding to the template type to which the contract template belongs from a preset correspondence relationship between the template type and the variable set, wherein the target variable set includes variables and / or calculation methods;

[0016] A third acquisition module is used to obtain, for each variable identification information, a candidate variable set corresponding to the variable identification information from the target variable set based on the context content of the variable identification information, wherein the candidate variable set includes variables and / or calculation methods;

[0017] A fourth acquisition module is used to obtain, for each of the variable identification information, a target variable having the highest similarity to the description keyword contained in the variable identification information based on the candidate variable set corresponding to the variable identification information;

[0018] The replacement module is used to replace the variable identification information contained in the contract template with the corresponding target variable to obtain the contract corresponding to the contract template.

[0019] According to a third aspect of an embodiment of the present disclosure, a server is provided, including:

[0020] processor;

[0021] a memory for storing instructions executable by the processor;

[0022] The processor is configured to execute the instructions to implement the automatic contract generation method as described in the first aspect.

[0023] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a server, the electronic device is enabled to execute the automatic contract generation method as described in the first aspect.

[0024] According to the fifth aspect of the embodiment of the present disclosure, a computer program product is provided, which can be directly loaded into the internal memory of a computer. The memory is the memory included in the server shown in the third aspect and contains software code. After the computer program is loaded and executed, it can implement the automatic contract generation method as described in the first aspect.

[0025] Through the above technical solution, it can be known that in the automatic contract generation method provided by the embodiment of the present application, a contract template is obtained; the editing content added by the user to the contract template is obtained, the editing content includes variable identification information, the variable identification information includes a variable identifier and a description keyword of the variable used to replace the variable identification information; from the correspondence between the preset template type and the variable set, the target variable set corresponding to the template type to which the contract template belongs is searched, the target variable set includes variables and / or calculation methods; for each variable identification information, based on the context content of the variable identification information, a candidate variable set corresponding to the variable identification information is obtained from the target variable set, the candidate variable set includes variables and / or calculation methods; for each variable identification information, based on the candidate variable set corresponding to the variable identification information, a target variable with the highest similarity to the description keyword contained in the variable identification information is obtained; the variable identification information contained in the contract template is replaced with the corresponding target variable to obtain the contract corresponding to the contract template. Thus, the purpose of automatically filling variables into the contract template is achieved, which saves time and speeds up the contract generation compared with the user manually filling in variables. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0027] Figure 1 A schematic diagram of the hardware architecture involved in the embodiments of the present application;

[0028] Figure 2 A flowchart of a method for automatically generating a contract provided in an embodiment of the present application;

[0029] Figure 3a to Figure 3b A schematic diagram of a process for a user to add editing content to a contract template provided in an embodiment of the present application;

[0030] Figure 4 A structural diagram of a contract automatic generation device provided in an embodiment of the present application;

[0031] Figure 5 It is a block diagram showing a device used in an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0033] The embodiment of the present application provides a method, device, server, medium and product for automatically generating a contract. Before introducing the technical solution provided by the embodiment of the present application, the hardware architecture involved in the embodiment of the present application is first described.

[0034] like Figure 1 FIG. 1 is a schematic diagram of a hardware architecture involved in an embodiment of the present application. The hardware architecture includes: an electronic device 11 and a server 12 .

[0035] Exemplarily, the electronic device 11 can be any electronic product that can interact with a user through one or more methods such as a keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device, such as a mobile phone, a laptop computer, a tablet computer, a PDA, a personal computer, a wearable device, a smart TV, a PAD, etc.

[0036] Exemplarily, the server 12 may be a single server, or a server cluster consisting of multiple servers, or a cloud computing server center. The server 12 may include a processor, a memory, a network interface, and the like.

[0037] It should be noted that Figure 1 This is just an example. The electronic device 11 may be of various types, not limited to Figure 1 Smartphone in the.

[0038] The electronic device 11 may send a contract generation request to the server 12 , where the contract generation request includes description information of a contract template of a contract to be generated.

[0039] Exemplarily, the description information may include: a contract identifier of the contract template and at least one of an application scenario of the contract template.

[0040] Exemplarily, the application scenarios are not limited to: buying and selling application scenarios, loan application scenarios, and service agreement application scenarios.

[0041] The server 12 may send a contract template matching the description information to the electronic device 11. The user of the electronic device 11 may edit the contract template and send the edited content to the server 12. The edited content includes variable identification information.

[0042] The server 12 can automatically obtain corresponding variables based on the edited content to replace the variable identification information, thereby achieving the purpose of not having to manually fill in the variables, saving the time of editing the contract template and speeding up the contract generation.

[0043] Those skilled in the art should understand that the above-mentioned electronic devices and terminal devices are only examples, and other existing or future electronic devices or terminal devices, if applicable to the present disclosure, should also be included in the protection scope of the present disclosure and are included here by reference.

[0044] The following is an explanation of the automatic contract generation method provided in the embodiment of the present application in combination with the above-mentioned hardware architecture.

[0045] like Figure 2 As shown, it is a flowchart of the automatic contract generation method provided in the embodiment of the present application. The method can be applied to Figure 1 In the server 12 shown, the method involves the following steps S21 to S26 during implementation.

[0046] Step S21: Obtain a contract template.

[0047] Exemplarily, the server may store a contract template. Exemplarily, the contract template may be an empty template without any text, or a template containing preset text to be refined or improved.

[0048] For example, the contract templates of different contract types may contain different preset texts.

[0049] Exemplarily, the format of the contract template may be the following formats (but not limited to the following formats): word format, HTML (Hyper Text Markup Language) format, PDF format.

[0050] Step S22: Acquire the edited content added to the contract template by the user, wherein the edited content includes variable identification information, and the variable identification information includes a variable identifier and a description keyword for replacing the variable in the variable identification information.

[0051] Exemplarily, the variable identifier is used to indicate that a variable needs to be added at the position where the variable identifier is located.

[0052] Exemplarily, the description keyword is used to describe at least one of the type (eg, value, amount, name, company name, etc.), range (eg, 0 to 10), and length (eg, byte length) of the variable to be added.

[0053] In an optional implementation, the variable identifier may be composed of one or more of letters, numbers, and special symbols. The following description is made by taking the variable identifier @@ as an example. Exemplarily, the format of the variable identification information is {@@description keyword}. The above-mentioned format of the variable identification information is only an example and does not limit the format of the variable identification information. For example, the format of the variable identification information is <@@, description keyword>. The following description is made by taking the format of the variable identification information as {@@description keyword} as an example.

[0054] Exemplarily, the description keyword may be empty. If the description keyword is not empty, the description keyword may include one or more keywords.

[0055] For example, if the user needs to add variables in certain positions of the contract template, the user does not need to find the variables that need to be filled in the position from multiple variables, but only needs to fill in {@@description keywords}. If the user does not want to fill in "description keywords", the description keywords can be empty, that is, the variable identification information is {@@}.

[0056] Exemplarily, the user may place the cursor at a corresponding position and then click a shortcut key to automatically fill in the variable identification information without the need for manual input by the user.

[0057] In order for those skilled in the art to better understand the user adding editing content to the contract template mentioned in the embodiments of the present application, the following examples are provided to illustrate.

[0058] like Figure 3a to Figure 3b As shown, it is a schematic diagram of the process of a user adding editing content to a contract template provided in an embodiment of the present application.

[0059] like Figure 3a Shown is a schematic diagram of a contract template provided in an embodiment of the present application.

[0060] Figure 3a The following is an example of a loan contract. If the lender and the guarantor are both fixed, then Figure 3b Set variable identification information as shown.

[0061] In an optional implementation, there may be multiple types of variable identification information. The embodiment of the present application provides but is not limited to the following two types: a fixed variable type and a processed variable type.

[0062] Among them, fixed variable type means that the variable is pre-set and does not need to be calculated, such as the name of the company, the name of the user, etc. Figure 3b The lender and guarantor shown are of fixed variable type.

[0063] Processing variable type refers to the variable that needs to be calculated, such as Figure 3b The loan interest shown. The loan interest needs to be calculated based on the loan amount and loan term.

[0064] Step S23: searching for a target variable set corresponding to the template type to which the contract template belongs from the preset correspondence between the template type and the variable set, wherein the target variable set includes variables and / or calculation methods.

[0065] In an optional implementation, the process of obtaining the template type to which the contract template belongs includes but is not limited to the following method: determining the template type to which the contract template belongs based on the description content corresponding to the contract template.

[0066] Exemplarily, the similarity between the description content and the contract templates of each known template type can be calculated. For any template type, based on the similarity between each contract template belonging to the template type and the description content, the similarity between the template type and the description content is obtained; the template type corresponding to the highest similarity is determined as the template type to which the above contract template belongs.

[0067] Exemplarily, the variable set may include at least one of a variable and a calculation method.

[0068] Step S24: for each of the variable identification information, based on the context content of the variable identification information, obtaining a candidate variable set corresponding to the variable identification information from the target variable set, the candidate variable set including variables and / or calculation methods.

[0069] Exemplarily, semantic analysis may be performed on the context content of the variable identification information to obtain candidate variables or candidate calculation methods that may be located at the position where the variable identification information is located.

[0070] The candidate variable set includes one or more candidate variables and / or one or more candidate calculation methods.

[0071] Exemplarily, the contextual content of the variable identification information and the target variable set can be input into a pre-built artificial intelligence model to obtain a candidate variable set output by the artificial intelligence model.

[0072] Exemplarily, the artificial intelligence model is obtained by training the machine learning model by taking the contextual content of the sample variable identification information and the sample variable set corresponding to the sample variable identification information as the input of the machine learning model, and taking the actual candidate variable set corresponding to the sample variable identification information as the training target.

[0073] Step S25: for each variable identification information, based on the candidate variable set corresponding to the variable identification information, obtain the target variable with the highest similarity to the description keyword contained in the variable identification information.

[0074] Exemplarily, if the description information is not empty and the variable identification information belongs to a fixed variable type, the similarity between the variables included in the candidate variable set and the description keywords can be calculated, so that each variable can be sorted according to the similarity to obtain the target variable with the highest similarity.

[0075] Exemplarily, if the description information is not empty and the variable identification information belongs to the processing variable type, the similarity between the calculation method included in the calculation candidate variable set and the description keyword can be calculated, so that each calculation method can be sorted according to the similarity to obtain the target calculation method with the highest similarity, and then calculation is performed based on the target calculation method to obtain the target variable.

[0076] In an optional implementation, step S25 includes the following steps A11 to A13.

[0077] Step A11: If the variable identification information belongs to a fixed variable type, a target variable having the highest similarity to the description keyword contained in the variable identification information is obtained from the candidate variable set corresponding to the variable identification information.

[0078] For example, the similarity can be expressed by Euclidean distance.

[0079] Exemplarily, if the variable identification information belongs to a fixed variable type, the variable set includes variables belonging to the fixed variable type.

[0080] Step A12: If the variable identification information belongs to a processing variable type, a target calculation method having the highest similarity to the description keyword contained in the variable identification information is obtained from the candidate variable set corresponding to the variable identification information.

[0081] For example, if the variable identification information belongs to a processing variable type, the variable set includes a calculation method, for example, a calculation method of interest.

[0082] Exemplarily, the calculation method includes: a calculation formula.

[0083] Step A13: Based on the target calculation method, calculate and obtain the target variable corresponding to the variable identification information.

[0084] Step S26: Replace the variable identification information contained in the contract template with the corresponding target variable to obtain the contract corresponding to the contract template.

[0085] It is understandable that the automatically filled target variable may be wrong, so the generated contract can be sent to the electronic device. If the user needs to modify a variable in the contract, the variable can be selected, and the electronic device will automatically display the candidate variable set corresponding to the variable. The variables or calculation methods contained in the candidate variable set are sorted from high to low according to the similarity. In this way, the user can select the variable or calculation method he needs from the candidate variable set.

[0086] In the automatic contract generation method provided by the embodiment of the present application, a contract template is obtained; the editing content added by the user to the contract template is obtained, the editing content includes variable identification information, the variable identification information includes a variable identifier and a description keyword of the variable used to replace the variable identification information; from the correspondence between the preset template type and the variable set, a target variable set corresponding to the template type to which the contract template belongs is searched, the target variable set includes variables and / or calculation methods; for each variable identification information, based on the context content of the variable identification information, a candidate variable set corresponding to the variable identification information is obtained from the target variable set, the candidate variable set includes variables and / or calculation methods; for each variable identification information, based on the candidate variable set corresponding to the variable identification information, a target variable with the highest similarity to the description keyword contained in the variable identification information is obtained; the variable identification information contained in the contract template is replaced with the corresponding target variable to obtain the contract corresponding to the contract template. Thus, the purpose of automatically filling variables into the contract template is achieved, which saves time and speeds up the contract generation compared with the manual filling of variables by users.

[0087] In an optional implementation, there are multiple implementations of step S21, and the embodiments of the present application provide but are not limited to the following two.

[0088] The first implementation method of step S21 includes the following steps B11 to B12.

[0089] Step B11: Obtain a contract generation request, wherein the contract generation request includes a contract identifier of the contract template.

[0090] Different contract templates have different contract IDs, but this requires users to remember the contract IDs of each contract template.

[0091] Step B12: Acquire the contract template having the contract identifier.

[0092] The second implementation method of step S21 includes the following steps B21 to B22.

[0093] Step B21: Obtain a contract generation request, wherein the contract generation request includes a description content corresponding to the contract template.

[0094] Exemplarily, the described content includes the content that the user expects the contract template to include, and / or, the application scenario.

[0095] Step B22: Determine the template type to which the contract template belongs based on the described content corresponding to the contract template.

[0096] Exemplarily, the similarity between the described content and the contract templates of each known template type can be calculated. For any template type, based on the similarities between each contract template belonging to this template type and the described content, the similarity between this template type and the described content can be obtained; the template type corresponding to the highest similarity is determined as the template type to which the above contract template belongs.

[0097] In an alternative implementation, for each template type, establishing the corresponding relationship between the template type and the variable set includes the following steps C11 to C14.

[0098] Step C11: Obtain multiple target contracts belonging to the template type.

[0099] Step C12: Screen out multiple candidate variables from the multiple target contracts.

[0100] Exemplarily, for each target contract, extract multiple keywords included in this target contract; remove the preset stop words from the multiple keywords to obtain multiple candidate variables.

[0101] For example, the preset stop words include: de, le, ne.

[0102] Step C13: Sort the multiple candidate variables in descending order according to the frequency of occurrence in the multiple target contracts to obtain a sorting result.

[0103] Exemplarily, the frequency of occurrence of a candidate variable in multiple target contracts = the number of target contracts containing this candidate variable / the total number of multiple target contracts.

[0104] Step C14: Divide the first preset number of candidate variables in the sorting result into the variable set corresponding to the template type.

[0105] In an alternative implementation, the usage permissions of the generated contracts can be set. If the user needs to use the generated Contract A, they need to log in. If the user permissions corresponding to the user account are higher than the usage permissions of Contract A, then they can view or use Contract A.

[0106] The method is described in detail in the embodiments disclosed in the above-mentioned application. The method of the application can be implemented by various forms of devices. Therefore, the application also discloses a device, and a specific embodiment is given below for detailed description.

[0107] like Figure 4 As shown, it is a structural diagram of the automatic contract generation device provided in an embodiment of the present application, and the device includes: a first acquisition module 41, a second acquisition module 42, a search module 43, a third acquisition module 44, a fourth acquisition module 45 and a replacement module 46, wherein:

[0108] A first acquisition module 41 is used to acquire a contract template;

[0109] A second acquisition module 42 is used to acquire edited content added to the contract template by a user, wherein the edited content includes variable identification information, and the variable identification information includes a variable identifier and a description keyword for replacing the variable of the variable identification information;

[0110] A search module 43, configured to search for a target variable set corresponding to the template type to which the contract template belongs from a preset correspondence relationship between the template type and the variable set, wherein the target variable set includes variables and / or calculation methods;

[0111] A third acquisition module 44 is used for obtaining, for each variable identification information, a candidate variable set corresponding to the variable identification information from the target variable set based on the context content of the variable identification information, the candidate variable set including variables and / or calculation methods;

[0112] A fourth acquisition module 45 is used to obtain, for each variable identification information, a target variable having the highest similarity to a description keyword included in the variable identification information based on a candidate variable set corresponding to the variable identification information;

[0113] The replacement module 46 is used to replace the variable identification information contained in the contract template with the corresponding target variable to obtain the contract corresponding to the contract template.

[0114] In an optional implementation, the first acquisition module includes:

[0115] A first acquisition unit, configured to acquire a request for generating a contract, wherein the request for generating a contract includes a contract identifier of the contract template;

[0116] The second acquisition unit is used to acquire the contract template having the contract identifier.

[0117] In an optional implementation, the method further includes:

[0118] A determination module is used to determine the template type to which the contract template belongs based on the description content corresponding to the contract template.

[0119] In an optional implementation, the method further includes:

[0120] a fifth acquisition module, configured to acquire, for each template type, a plurality of target contracts belonging to the template type;

[0121] A screening module, used for screening out a plurality of candidate variables from the plurality of target contracts;

[0122] A sorting module, used to sort the multiple candidate variables in descending order according to the frequencies of occurrence in the multiple target contracts to obtain a sorting result;

[0123] The partitioning module is used to partition the first preset number of candidate variables in the sorting result into a variable set corresponding to the template type.

[0124] In an optional implementation, the fourth acquisition module includes:

[0125] A third acquisition unit is used to obtain, if the variable identification information belongs to a fixed variable type, a target variable having the highest similarity to the description keyword contained in the variable identification information from the candidate variable set corresponding to the variable identification information;

[0126] A fourth acquisition unit is used for obtaining, if the variable identification information belongs to a processing variable type, a target calculation method having the highest similarity to a description keyword included in the variable identification information from a candidate variable set corresponding to the variable identification information;

[0127] A calculation unit is used to calculate the target variable corresponding to the variable identification information based on the target calculation method.

[0128] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0129] Figure 5 The invention is a block diagram showing a device for a server according to an exemplary embodiment.

[0130] The server includes, but is not limited to, a processor 51 , a memory 52 , a network interface 53 , an I / O controller 54 , and a communication bus 55 .

[0131] It should be noted that those skilled in the art can understand that Figure 5 The server structure shown in the figure does not constitute a limitation on the server, and the server may include Figure 5More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.

[0132] Combine the following Figure 5 A detailed introduction to each component of the server:

[0133] The processor 51 is the control center of the server. It uses various interfaces and lines to connect various parts of the entire server. It executes various functions of the server and processes data by running or executing software programs and / or modules stored in the memory 52, and calling data stored in the memory 52, so as to monitor the server as a whole. The processor 51 may include one or more processing units; illustratively, the processor 51 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 51.

[0134] The processor 51 may be a central processing unit (CPU), or an application specific integrated circuit ASIC (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;

[0135] The memory 52 may include a memory, such as a high-speed random access memory (RAM) 521 and a read-only memory (ROM) 522, and may also include a large-capacity storage device 523, such as at least one disk storage, etc. Of course, the server may also include hardware required for other services.

[0136] The memory 52 is used to store instructions executable by the processor 51. The processor 51 has the following functions:

[0137] Get a contract template;

[0138] Acquire edited content added to the contract template by a user, wherein the edited content includes variable identification information, wherein the variable identification information includes a variable identifier and a description keyword for replacing a variable in the variable identification information;

[0139] From the preset correspondence between the template type and the variable set, searching for the target variable set corresponding to the template type to which the contract template belongs, the target variable set including variables and / or calculation methods;

[0140] For each of the variable identification information, based on the context content of the variable identification information, obtaining a candidate variable set corresponding to the variable identification information from the target variable set, the candidate variable set including variables and / or calculation methods;

[0141] For each of the variable identification information, based on the candidate variable set corresponding to the variable identification information, obtaining the target variable with the highest similarity to the description keyword contained in the variable identification information;

[0142] The variable identification information contained in the contract template is replaced with the corresponding target variable to obtain the contract corresponding to the contract template.

[0143] A wired or wireless network interface 53 is configured to connect the server to the network.

[0144] The processor 51, the memory 52, the network interface 53 and the I / O controller 54 can be interconnected via a communication bus 55, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0145] In an exemplary embodiment, the server can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the automatic contract generation method between the above-mentioned knowledge points.

[0146] In an exemplary embodiment, the present disclosure provides a storage medium including instructions, such as a memory 52 including instructions, and the instructions can be executed by a processor 51 of a server to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0147] In an exemplary embodiment, a computer-readable storage medium is also provided, which can be directly loaded into the internal memory of a computer, such as the above-mentioned memory 52, and contains software code. After being loaded and executed by a computer, the computer program can implement the steps shown in any embodiment of the above-mentioned automatic contract generation method.

[0148] In an exemplary embodiment, a computer program product is also provided, which can be directly loaded into the internal memory of a computer, such as the memory contained in the server, and contains software code. After being loaded and executed by a computer, the computer program can implement the steps shown in any embodiment of the above-mentioned automatic contract generation method.

[0149] It should be noted that the automatic contract generation method, device, server, medium and product provided by the present invention can be used in the financial field or other fields, for example, can be used in loan application scenarios in the financial field. Other fields are any fields other than the financial field. The above is only an example and does not limit the application field of the automatic contract generation method, device, server, medium and product provided by the present invention.

[0150] It should be noted that the features described in the various embodiments in this specification can be replaced or combined with each other. For the device or system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0151] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0152] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0153] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for automatically generating a contract, characterized in that: include: Get a contract template; Acquire edited content added to the contract template by a user, the edited content including variable identification information, the variable identification information including a variable identifier and a description keyword of a variable used to replace the variable identification information, the variable identifier being used to indicate that a variable needs to be added at a position where the variable identifier is located, and the description keyword being used to describe at least one of a type, a range, and a length of the variable to be added; From the preset correspondence between the template type and the variable set, searching for the target variable set corresponding to the template type to which the contract template belongs, the target variable set including variables and / or calculation methods; For each of the variable identification information, based on the context content of the variable identification information, a candidate variable set corresponding to the variable identification information is obtained from the target variable set, the candidate variable set including variables and / or calculation methods; For each of the variable identification information, based on the candidate variable set corresponding to the variable identification information, obtaining the target variable with the highest similarity to the description keyword contained in the variable identification information; Replacing the variable identification information contained in the contract template with the corresponding target variable to obtain the contract corresponding to the contract template; The step of obtaining the target variable having the highest similarity to the description keyword contained in the variable identification information based on the candidate variable set corresponding to the variable identification information includes: If the variable identification information belongs to a fixed variable type, obtaining a target variable having the highest similarity to the description keyword contained in the variable identification information from a set of candidate variables corresponding to the variable identification information; If the variable identification information belongs to a processing variable type, obtaining a target calculation method having the highest similarity to a description keyword included in the variable identification information from a candidate variable set corresponding to the variable identification information; Based on the target calculation method, the target variable corresponding to the variable identification information is calculated.

2. The method for automatically generating a contract according to claim 1, characterized in that: The acquisition contract template includes: Obtaining a contract generation request, wherein the contract generation request includes a contract identifier of the contract template; Obtain the contract template having the contract identifier.

3. The method for automatically generating a contract according to claim 1, characterized in that: Before the step of searching the target variable set corresponding to the template type to which the contract template belongs from the preset correspondence between the template type and the variable set, the step further includes: Based on the description content corresponding to the contract template, determine the template type to which the contract template belongs.

4. The method for automatically generating a contract according to any one of claims 1 to 3, characterized in that: Establishing the correspondence between template types and variable sets includes: For each template type, obtaining a plurality of target contracts belonging to the template type; Screening out a plurality of candidate variables from the plurality of target contracts; Sorting the multiple candidate variables in descending order according to the frequencies of occurrence in the multiple target contracts to obtain a sorting result; The first preset number of candidate variables in the sorting result are divided into a variable set corresponding to the template type.

5. A contract automatic generation device, characterized in that: include: The first acquisition module is used to acquire the contract template; A second acquisition module is used to acquire the edited content added to the contract template by the user, wherein the edited content includes variable identification information, wherein the variable identification information includes a variable identifier and a description keyword of a variable used to replace the variable identification information, wherein the variable identifier is used to indicate that a variable needs to be added at the position where the variable identifier is located, and the description keyword is used to describe at least one of a type, a range, and a length of the variable to be added; A search module, used to search for a target variable set corresponding to the template type to which the contract template belongs from a preset correspondence relationship between the template type and the variable set, wherein the target variable set includes variables and / or calculation methods; A third acquisition module is used to obtain, for each variable identification information, a candidate variable set corresponding to the variable identification information from the target variable set based on the context content of the variable identification information, wherein the candidate variable set includes variables and / or calculation methods; A fourth acquisition module is used to obtain, for each of the variable identification information, a target variable having the highest similarity to the description keyword contained in the variable identification information based on the candidate variable set corresponding to the variable identification information; A replacement module, used to replace the variable identification information contained in the contract template with the corresponding target variable to obtain the contract corresponding to the contract template; The fourth acquisition module is used to obtain the target variable with the highest similarity to the description keyword contained in the variable identification information based on the candidate variable set corresponding to the variable identification information, and specifically includes: If the variable identification information belongs to a fixed variable type, obtaining a target variable having the highest similarity to the description keyword contained in the variable identification information from a set of candidate variables corresponding to the variable identification information; If the variable identification information belongs to a processing variable type, obtaining a target calculation method having the highest similarity to a description keyword included in the variable identification information from a candidate variable set corresponding to the variable identification information; Based on the target calculation method, the target variable corresponding to the variable identification information is calculated.

6. The automatic contract generation device according to claim 5, characterized in that: The first acquisition module includes: A first acquisition unit, configured to acquire a request for generating a contract, wherein the request for generating a contract includes a contract identifier of the contract template; The second acquisition unit is used to acquire the contract template having the contract identifier.

7. A server, characterized in that: include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the automatic contract generation method as described in any one of claims 1 to 4.

8. A computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables a server to execute the automatic contract generation method as described in any one of claims 1 to 4.

9. A computer program product that can be directly loaded into the internal memory of a computer, wherein the memory is the memory contained in the server described in claim 7 and contains software code. After being loaded and executed by a computer, the computer program can implement the automatic contract generation method described in any one of claims 1 to 4.