Contract text generation method and device, computer equipment and storage medium

By using asynchronous threads to load the contract template content and resource data during the contract text generation process, the problem of waiting time in the electronic contract generation process is solved, and user experience and efficiency are improved.

CN119167908APending Publication Date: 2024-12-20SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310734810.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-20
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

During the generation of electronic contract files, after the user fills in all authentication information, the waiting time for querying the database and converting pictures is too long, resulting in white screen waiting problems and affecting the user experience.

Method used

By using two threads to obtain contract type information and load the contract template contents respectively when generating an electronic contract, and preload the contract resource data during asynchronous execution, the time to finally form the target contract text electronic file.

Benefits of technology

It effectively reduces the time for contract text generation, improves user experience, avoids the white screen problem caused by waiting time, and improves the efficiency of the electronic contract signing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119167908A_ABST
    Figure CN119167908A_ABST
Patent Text Reader

Abstract

The invention provides a contract text generation method and device, computer equipment and a storage medium. The method comprises the steps of obtaining contract type information of a to-be-generated target contract text through a first thread; contract template content is determined according to the contract type information through a second thread, the contract template content is preloaded to obtain a preloaded text, meanwhile, contract basic information of the target contract text is obtained through the first thread, and the contract basic information is to-be-filled information in the contract template content; and filling the basic information of the contract into the preloaded text through the second thread to generate the target contract text. By the adoption of the method, when the electronic contract is generated, collection of part of data and loading of part of contract documents are executed asynchronously and simultaneously, so that the time for finally forming a target contract text electronic file is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer network technology, and in particular to a method, apparatus, computer equipment and storage medium for generating a contract text. Background Art

[0002] As the company's business development needs, the contract documents in the process of signing were transformed electronically to achieve the purpose of electronic archiving of the process track before signing. After the transformation, the content modules in the contract documents were split and freely combined, but the waiting time for querying database data and converting images when loading each contract document content module caused the problem of white screen waiting when the user filled in all the relevant authentication information online at one time when generating the electronic file, which greatly affected the user experience. Summary of the invention

[0003] Based on this, it is necessary to provide a contract text generation method, device, computer equipment and storage medium to address the above technical problems, so that when generating an electronic contract, the collection of some information and the loading of some contract documents can be performed asynchronously and simultaneously to reduce the time to finally form the target contract text electronic file.

[0004] In a first aspect, the present application provides a method for generating a contract text, comprising:

[0005] Acquire, through the first thread, contract type information of the target contract text to be generated;

[0006] Determine the content of the contract template according to the contract type information through the second thread, preload the content of the contract template to obtain a preloaded text, and simultaneously obtain basic contract information of the target contract text through the first thread, where the basic contract information is the information to be filled in the content of the contract template;

[0007] The target contract text is generated by filling the basic contract information into the preloaded text through the second thread.

[0008] In some embodiments of the present application, the preloading of the contract template content by the second thread to obtain the preloaded text includes:

[0009] Dividing the contract template content into a plurality of contract resource data based on a preset content format division strategy through the second thread, and determining the position code of the contract resource data according to the contract template content;

[0010] Preloading the contract resource data through the second thread to obtain a file stream and cache it, wherein the file stream corresponds to the contract resource data one by one;

[0011] The file stream is merged into the preloaded text according to the position code through the second thread.

[0012] In some embodiments of the present application, the contract resource data includes text resources and non-text resources, and the text resources and the non-text resources are respectively stored in different databases, and the preloading of the contract resource data by the second thread to obtain a file stream and cache it includes:

[0013] Through the concurrent operation of the second thread, the text resources and the non-text resources are loaded from the different databases respectively;

[0014] Each time the contract resource data is preloaded, it is converted into a file stream for caching.

[0015] In some embodiments of the present application, the step of preloading the contract resource data through the second thread to obtain a file stream and cache the file stream includes:

[0016] preloading the contract resource data one by one through the second thread;

[0017] Each time the contract resource data is preloaded, it is converted into a file stream for caching.

[0018] In some embodiments of the present application, the acquiring the basic contract information of the target contract text through the first thread includes:

[0019] Displaying the information to be input of the contract template content through the first thread, wherein the information to be input includes context text of the information to be filled in the contract template content;

[0020] Acquire, through the first thread, information to be identified based on the information to be input, wherein the information to be identified includes the information to be filled in the contract template content and context text of the information to be filled in;

[0021] The basic contract information in the information to be identified is determined through the first thread according to the context text of the information to be input.

[0022] In some embodiments of the present application, the acquiring, through the first thread, contract type information of the target contract text to be generated includes:

[0023] Acquire business parameters of the target contract text to be generated through the first thread;

[0024] The business parameters are matched with the preset characteristic information of each type of contract text through the first thread to obtain the contract type information of the target contract text.

[0025] In some embodiments of the present application, after filling the basic contract information into the preloaded text to generate the target contract text through the second thread, the method further includes:

[0026] The target contract text is displayed through the first thread, and the target contract text is stored through the second thread.

[0027] In a second aspect, the present application provides a contract text generation device, comprising:

[0028] An information acquisition module, used to acquire contract type information of a target contract text to be generated through a first thread;

[0029] a preloading module, which is in communication connection with the information acquisition module, and is used to determine the content of the contract template according to the contract type information through the second thread, and preload the content of the contract template to obtain a preloaded text, and at the same time obtain the basic contract information of the target contract text through the first thread, wherein the basic contract information is the information to be filled in the content of the contract template;

[0030] A text generation module is communicatively connected to the preloading module, and is used to fill the basic contract information into the preloading text through the second thread to generate the target contract text.

[0031] In some embodiments of the present application, the preloading module is also used to divide the contract template content into a number of contract resource data based on a preset content format division strategy through the second thread, and determine the position code of the contract resource data according to the contract template content; preload the contract resource data through the second thread to obtain a file stream and cache it, and the file stream corresponds one-to-one to the contract resource data; merge the file stream into the preloaded text according to the position code through the second thread.

[0032] In some embodiments of the present application, the contract resource data includes text resources and non-text resources, and the text resources and the non-text resources are respectively stored in different databases. The preloading module is also used to load the text resources and the non-text resources from the different databases respectively through the concurrent operation of the second thread; each time the contract resource data is preloaded, it is converted into a file stream for caching.

[0033] In some embodiments of the present application, the preloading module is further used to preload the contract resource data one by one through the second thread; each time the contract resource data is preloaded, it is converted into a file stream for caching.

[0034] In some embodiments of the present application, the preloading module is also used to display the information to be input of the contract template content through the first thread, and the information to be input includes the context text of the information to be filled in the contract template content; obtain the information to be identified based on the information to be input through the first thread, and the information to be identified includes the information to be filled in the contract template content and the context text of the information to be filled in; determine the basic contract information in the information to be identified according to the context text of the information to be input through the first thread.

[0035] In some embodiments of the present application, the information acquisition module is also used to obtain the business parameters of the target contract text to be generated through the first thread; match the business parameters with the preset characteristic information of each type of contract text through the first thread to obtain the contract type information of the target contract text.

[0036] In some embodiments of the present application, the text generation module is also used to display the target contract text through the first thread and store the target contract text through the second thread.

[0037] In a third aspect, the present application further provides a computer device, the computer device comprising:

[0038] one or more processors;

[0039] A memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the contract text generation method.

[0040] In a fourth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the contract text generation method.

[0041] In the above-mentioned contract text generation method, device, computer equipment and storage medium, after the first thread obtains the contract type information, the second thread preloads the contract template content corresponding to the contract type information, and at the same time, the first thread asynchronously obtains the basic contract information of the target contract text, avoiding obtaining all the information filled in by the user at one time, but asynchronously executing the collection of part of the information and the loading of part of the contract documents at the same time, so as to reduce the time to finally form the electronic file of the target contract text. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 It is a flowchart of the method for generating a contract text in an embodiment of the present application;

[0044] Figure 2 is a flowchart of a method for generating a contract text in another embodiment of the present application;

[0045] Figure 3 It is a structural schematic diagram of a contract text generating device in an embodiment of the present application;

[0046] Figure 4 It is a schematic diagram of the structure of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0047] 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 those skilled in the art without creative work are within the scope of protection of this application.

[0048] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0049] In the description of the present application, the word "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0050] See also Figure 1 The embodiment of the present application provides a method for generating a contract text, which includes steps S101 to S103, as follows:

[0051] S101, obtaining contract type information of a target contract text to be generated through a first thread.

[0052] Specifically, the target contract text to be generated is the contract that the user wants to sign, and the contract text includes contract terms, contract signatory information, signature column, attachments, etc. Among them, the types of contract texts are different based on the purpose of signing, such as rental contracts, loan contracts, etc. In addition, based on different requirements in certain aspects, the above different types of contract texts also have great differences, so the types of contract texts can be further subdivided. For example, the contract terms corresponding to different loan periods of loan contracts have certain differences.

[0053] For the same type of contract text, some of its contract terms, attachments and other information are the same common content, so the same content of each type of contract text is modularized to obtain different templates for each type of contract text, that is, based on the needs of different business scenarios, the contract content module is configured so that the corresponding category of contract text can be directly called. The contract type information is the type identification information of each type of contract text, which can be a one-to-one and unique code identification information preset by the user, such as rental contract 001, or a name determined based on the characteristics of each type of contract text, such as a monthly express fee contract.

[0054] The contract type information of the target contract text to be generated input by the user is obtained through the human-computer interaction interface of the terminal device front end, and the input method includes but is not limited to text input, voice recognition, etc. The first thread is the thread executed by the terminal device front end.

[0055] In one embodiment, this step includes: S201, obtaining business parameters of the target contract text to be generated through the first thread; S202, matching the business parameters with characteristic information of each type of preset contract text through the first thread to obtain contract type information of the target contract text.

[0056] Specifically, for a user who clearly knows the information of the target contract text that he wants to sign, the contract type information of the target contract text input by the user can be directly obtained. In addition, the contract type information of the target contract text can be determined by matching with the characteristic information of different types of contract texts.

[0057] The preset characteristic information of each type of contract text is a summary of part of the content of the contract text, including but not limited to the purpose, term and other information of the contract text. The business parameters of the target contract text to be generated are the characteristics of the desired target contract text input by the user, which can be the purpose, term and other information of the contract text input by the user, or the preset characteristic information of each type of contract text can be directly selected by the user as an optional object. The business parameters of the target contract text to be generated are obtained through the first thread, and then matched with the preset characteristic information of each type of contract text, so as to determine the contract type information of the target contract text.

[0058] S102, determining the content of the contract template according to the contract type information through the second thread, and preloading the content of the contract template to obtain a preloaded text, and at the same time obtaining the basic contract information of the target contract text through the first thread, where the basic contract information is the information to be filled in the content of the contract template.

[0059] Specifically, after the first thread obtains the contract type information of the target contract text to be generated, it asynchronously triggers the interface for calling the preloading function of the second thread of the backend. The second thread determines the contract template content of this type of contract text based on the contract type information passed in by the preloading interface. The contract template content is the common information of this type of contract text. The second thread preloads the contract template content to obtain the preloaded text.

[0060] At the same time, the basic contract information of the target contract text is obtained through the first thread, that is, the preloaded text obtained by the first thread is asynchronously executed simultaneously with the acquisition of the basic contract information by the first thread. For each type of contract text, some content is user-defined, such as the loan amount of the loan contract, the settlement ratio of the settlement contract, etc. In addition, the identity information of different contract signatories is also different, so there are some blank areas to be filled in the contract template content of each type of contract text. The basic contract information of the target contract text is the information to be filled in the blank areas to be filled in the above contract template content, including but not limited to the identity information of the contract signer, additional terms, the identity information of the signer, signature, date, etc.

[0061] In this embodiment, when the user fills in the basic contract information of the target contract text on the front-end page, the back-end preloads the contract template content, and the two are executed asynchronously at the same time to reduce the time to finally form the electronic file of the target contract text.

[0062] In one embodiment, the preloading of the contract template content by the second thread to obtain the preloaded text includes: S301, dividing the contract template content into a plurality of contract resource data based on a preset content format division strategy by the second thread, and determining the position code of the contract resource data according to the contract template content; S302, preloading the contract resource data by the second thread to obtain the same number of file streams and cache them, and the file streams correspond one-to-one to the contract resource data; S303, merging the file streams into the preloaded text according to the position code by the second thread.

[0063] Specifically, different types of contract texts have different common contents. Based on the needs of different business scenarios, the contract content module is configured, that is, the common contents of various types of contract texts are typeset to obtain various types of contract template contents. The areas in the contract template content that require user input of to-be-filled information are blank areas, so the second thread determines the contract template content based on the contract type information. Among them, the pre-configured contract template content is stored in the database for calling during preloading. The contract template content includes text and non-text content. Content of different formats can be stored in different databases according to content format classification, which is more convenient for management and calling. For example, the contract template content is stored by MYSQL and the OSS file storage disk in the cloud. MYSQL stores simple text terms descriptions, and OSS stores non-text price lists, pictures and other files.

[0064] The second thread divides the contract template content into several contract resource data based on a preset content format division strategy. The preset content format division strategy is to divide the contract template content into text and non-text categories, that is, the contract resource data includes text resources and non-text resources, and the text resources and non-text resources are stored in different databases respectively.

[0065] The contents of the contract template are pre-formatted according to the contract text format requirements. Therefore, the second thread determines the position code of each contract resource data after splitting according to the contract template content. The position code is used to represent the relative position of each contract resource data in the contract template content. For example, the position code is the ID or class of the contract template content, so that the resources can be arranged in order after being acquired later.

[0066] The second thread preloads some contract resource data to obtain file streams and caches them. The file streams correspond to the contract resource data one by one, so the number of file streams and contract resource data is the same. Then, the file streams are merged into preloaded texts according to the position code, that is, the preloaded texts are the contract template contents that have been preloaded and cached. After the blank areas in the contract template contents are filled with the required information, the complete target contract text can be obtained.

[0067] In one embodiment, the contract resource data includes text resources and non-text resources, and the text resources and the non-text resources are stored in different databases respectively. Step S303, preloading the contract resource data through the second thread to obtain a file stream and cache it, includes: S401, through the concurrent operation of the second thread, loading the text resources and the non-text resources from the different databases respectively; S402, each time the contract resource data is preloaded, it is converted into a file stream for caching.

[0068] Specifically, the content of the contract template includes text and non-text content, and the content of different formats can be stored in different databases according to the content format classification. When preloading the contract resource data obtained after dividing the contract template content, resource data of different categories are called from different databases respectively, so concurrent operations are set, and text resources and non-text resources are loaded from different databases respectively at the same time, and each preloaded contract resource data is converted into a file stream for caching, that is, preload contract resource data A, convert it into file stream A, and then preload contract resource data B, convert it into file stream B, and so on, preload and convert each contract resource data one by one. This embodiment improves the speed of preloading through concurrent operations, and further reduces the time to finally form the target contract text electronic file.

[0069] In one embodiment, step S303, preloading the contract resource data through the second thread to obtain a file stream and cache it, includes: S501, preloading the contract resource data one by one through the second thread; S502, each time the contract resource data is preloaded, it is converted into a file stream for caching.

[0070] Specifically, the second thread preloads a number of contract resource data one by one, and each preloaded contract resource data is converted into a file stream for caching. The contract resource data can be preloaded one by one based on the order of the position coding, so that the merging process of the obtained file stream is simpler. This embodiment has low requirements on the data processing capability of the second thread, and has no requirements on the storage method of each content in the contract template content.

[0071] In one embodiment, the step of obtaining basic contract information of the target contract text through the first thread includes: S601, displaying the information to be input of the contract template content through the first thread, the information to be input includes the context text of the information to be filled in the contract template content; S602, obtaining information to be identified based on the information to be input through the first thread, the information to be identified includes the information to be filled in the contract template content and the context text of the information to be filled in; S603, determining the basic contract information in the information to be identified according to the context text of the information to be input through the first thread.

[0072] Specifically, the first thread displays the information to be input in the contract template content, and the information to be input includes the context text of the information to be filled in the contract template content, that is, the blank area in the contract template content that needs to be filled in by the user and the context text of the blank area are displayed, and the user can clearly understand the content to be filled in based on the context text. For example, if a loan contract needs to fill in the loan amount, and the loan amount is the information to be filled in, then the displayed information to be input is "the loan amount is _".

[0073] The information to be identified is obtained based on the information to be input. The information to be identified may include a large amount of information. In order to reduce the difficulty of identification, the information to be identified includes the information to be filled in the contract template content and the context text of the information to be filled in. That is, when the user enters the information to be identified, he not only enters the information to be filled in, but also includes part of the context text of the information to be filled in the displayed information to be input. For example, if the loan contract needs to fill in the loan amount, and the loan amount is the information to be filled in, the displayed information to be input is "the loan amount is _", and the text corresponding to the information to be identified entered by the user should include part or all of the information of the loan amount, that is, the input information to be identified is "the loan amount is 600,000 yuan" or "the amount is 600,000 yuan".

[0074] Among them, the user can input the information to be identified in voice format through a microphone or the like, or can obtain the information to be identified in image format by taking photos or the like. Therefore, after obtaining the information to be identified in voice format or image format, it is necessary to identify and obtain text information. Among them, the technical means of speech and text recognition and image recognition are not specifically limited in this embodiment. The information to be identified is matched with the context text of the information to be filled in the contract template content, and the text in the information to be identified that is the same as the context text of the information to be filled in is found, and the information to be filled in the information to be identified is determined based on the context text of the information to be filled in and the order of the information to be filled in, that is, the basic information of the contract in the information to be identified is determined.

[0075] In addition, after the basic contract information in the information to be identified is determined, it can be filled into the blank area of ​​the information to be entered and previewed, and the user can confirm again whether the identified basic contract information is accurate. The user can edit and modify the erroneous content until all content is confirmed to be correct and then enter the user confirmation information. The final basic contract information is determined based on the user confirmation information.

[0076] S103: Fill the basic contract information into the preloaded text through the second thread to generate the target contract text.

[0077] Specifically, when all the preloaded texts of the second thread are cached in the cache pool and the basic contract information of the target contract text is obtained through the first thread, the second thread pulls the preloaded text cached in the memory, fills the basic contract information into the preloaded text, and replaces the blank identifiers in the blank areas of the preloaded text based on the identifiers of various types of information in the basic contract information to generate the target contract text.

[0078] In one embodiment, this step is followed by: S701, displaying the target contract text through the first thread, and storing the target contract text through the second thread.

[0079] Specifically, after the second thread generates the target contract text, the first thread displays the target contract text for the user to view, and the second thread stores the target contract text, and the second thread can also upload it to a server cloud or other device. The first thread displays the target contract text and the second thread stores the target contract text asynchronously and simultaneously.

[0080] This embodiment configures the contract content module based on the needs of different business scenarios, pre-sets the contract template content of different types of contract texts, and then when the user fills in the relevant information of the target contract text on the front end, the back end asynchronously pre-loads the contract template content of the selected type, does not occupy or block the time for forming the electronic contract file, and ensures that there is no obvious delay in jumping between pages during the electronic contract signing process.

[0081] like Figure 2As shown, the embodiment of the present application provides a method for generating a contract text, which is analyzed from the underlying technical level of the Spring framework and the JAVA virtual machine, and the module configuration information in the file is obtained by pre-traversal, so as to realize multi-module preloading in the signing process and improve the efficiency of electronic contract generation. Each contract type corresponds to different clause contents, which are stored by MYSQL and the OSS file storage disk in the cloud. MYSQL stores simple text clause descriptions, and OSS stores price lists, pictures and other files. Preloading is a performance optimization technology that can be used to preload data to be used in the file content. In the development of contract DOC file generation, preloading is to load all the file contents to be used into the memory of the JAVA virtual machine in advance, and directly obtain the contract content from the memory for assembly when generating the contract DOC file.

[0082] The contract text generation method includes:

[0083] The S1 backend JAVA virtual machine (second thread) provides an interface for preloading function calls;

[0084] S2, when the front-end (first thread) signing APP page completes filling in the basic information required for applying for the monthly settlement of express fees and selecting the contract type (i.e. the front-end fills in the contract type information), the interface for calling the back-end JAVA virtual machine preloading function is asynchronously triggered;

[0085] S3. The backend JAVA virtual machine determines the content of the contract template to be loaded according to the contract type information passed in the preloading interface;

[0086] S4, concurrent operations set in the backend JAVA virtual machine interface, respectively load text resources in MYSQL and load corresponding non-text resources in the OSS file storage disk;

[0087] S5. After each contract resource data is loaded, the backend JAVA virtual machine converts the corresponding contract resource data into a file stream Stream and caches it in the cache pool to obtain a preloaded text;

[0088] S6. The front-end APP jumps to the basic contract information confirmation page. The user clicks the confirmation button to transmit the basic contract information to the back-end JAVA virtual machine through the contract electronic file generation interface. The back-end JAVA virtual machine pulls the contract electronic file stream cached in the memory, fills the basic contract information into the preloaded text, generates an electronic contract file, returns to the APP end for interface display, and asynchronously uploads the electronic contract to cloud storage.

[0089] Among them, in step S6, the front end obtains the basic contract information of the target contract text and can obtain the user's voice information. When the user fills in the information, the voice input function is turned on to send instructions to the voice recognition system; the front end displays the information to be input in the contract template content, and the information to be input includes the context text of the information to be filled in the contract template content. After the voice information is collected by the microphone, it is transmitted to the voice recognition engine; the voice recognition engine uses a deep neural network model to extract features and pattern recognition, and the voice information includes the voice information of the context text of the information to be filled in the contract template content, and converts the voice information into information to be recognized; the information to be recognized is analyzed semantically and executed by commands to realize the automatic operation of user instructions; the recognized information to be recognized is automatically filled in the corresponding filling position of the contract template content according to the context text of the information to be filled; the user reviews and proofreads the basic contract information after recognition; the APP page initiates the contract signing, and the generated contract data is encrypted and stored on the blockchain to achieve data security and credibility.

[0090] In this embodiment, when the user fills in the contract information on the page, the contract terms are preloaded, which does not occupy or block the time for forming the electronic contract file; the contract content module is configured and preloaded automatically according to the business scenario; there is no obvious delay in jumping between pages during the contract process.

[0091] like Figure 3 As shown, the embodiment of the present application provides a contract text generation device 900, including:

[0092] An information acquisition module 910 is used to acquire contract type information of a target contract text to be generated through a first thread;

[0093] The preloading module 920 is communicatively connected with the information acquisition module 910, and is used to determine the content of the contract template according to the contract type information through the second thread, and preload the content of the contract template to obtain a preloaded text, and simultaneously obtain the basic contract information of the target contract text through the first thread, where the basic contract information is the information to be filled in the content of the contract template;

[0094] The text generation module 930 is in communication with the preloading module 920 and is used to fill the basic contract information into the preloaded text through the second thread to generate the target contract text.

[0095] In some embodiments of the present application, the preloading module 920 is also used to divide the contract template content into a number of contract resource data based on a preset content format division strategy through the second thread, and determine the position code of the contract resource data according to the contract template content; preload the contract resource data through the second thread to obtain a file stream and cache it, and the file stream corresponds one-to-one to the contract resource data; merge the file stream into the preloaded text according to the position code through the second thread.

[0096] In some embodiments of the present application, the contract resource data includes text resources and non-text resources, and the text resources and the non-text resources are respectively stored in different databases. The preloading module 920 is also used to load the text resources and the non-text resources from the different databases respectively through the concurrent operation of the second thread; each time the contract resource data is preloaded, it is converted into a file stream for caching.

[0097] In some embodiments of the present application, the preloading module 920 is further configured to preload the contract resource data one by one through the second thread; each time a contract resource data is preloaded, it is converted into a file stream for caching.

[0098] In some embodiments of the present application, the preloading module 920 is also used to display the information to be input of the contract template content through the first thread, and the information to be input includes the context text of the information to be filled in the contract template content; obtain the information to be identified based on the information to be input through the first thread, and the information to be identified includes the information to be filled in the contract template content and the context text of the information to be filled in; determine the basic contract information in the information to be identified according to the context text of the information to be input through the first thread.

[0099] In some embodiments of the present application, the information acquisition module 910 is also used to obtain the business parameters of the target contract text to be generated through the first thread; match the business parameters with the preset characteristic information of each type of contract text through the first thread to obtain the contract type information of the target contract text.

[0100] In some embodiments of the present application, the text generation module 930 is also used to display the target contract text through the first thread and store the target contract text through the second thread.

[0101] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0102] For example, Figure 4 The computer device shown can be Figure 3The information acquisition module 910 in the contract text generation device 900 shown executes step S101. The computer device can execute step S102 through the preloading module 920. The computer device can execute step S103 through the text generation module 930. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external computer device through a network connection. When the computer program is executed by the processor, a contract text generation method is implemented.

[0103] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0104] In some embodiments of the present application, a computer device is provided, comprising one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to execute the steps of the above-mentioned contract text generation method by the processor. The steps of the contract text generation method here can be the steps of the contract text generation method in the above-mentioned various embodiments.

[0105] In some embodiments of the present application, a computer-readable storage medium is provided, which stores a computer program, and the computer program is loaded by a processor, so that the processor executes the steps of the above-mentioned contract text generation method. The steps of the contract text generation method here can be the steps of the contract text generation method in each of the above-mentioned embodiments.

[0106] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0107] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0108] The above is a detailed introduction to a contract text generation method, device, computer equipment and storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for generating a contract text, characterized in that: include: Acquire, through the first thread, contract type information of the target contract text to be generated; Determine the content of the contract template according to the contract type information through the second thread, preload the content of the contract template to obtain a preloaded text, and simultaneously obtain basic contract information of the target contract text through the first thread, where the basic contract information is the information to be filled in the content of the contract template; The target contract text is generated by filling the basic contract information into the preloaded text through the second thread.

2. The method for generating a contract text according to claim 1, characterized in that: The step of preloading the contract template content through the second thread to obtain the preloaded text includes: Dividing the contract template content into a plurality of contract resource data based on a preset content format division strategy through the second thread, and determining the position code of the contract resource data according to the contract template content; Preloading the contract resource data through the second thread to obtain a file stream and cache it, wherein the file stream corresponds to the contract resource data one by one; The file stream is merged into the preloaded text according to the position code through the second thread.

3. The method for generating a contract text according to claim 2, characterized in that: The contract resource data includes text resources and non-text resources, and the text resources and the non-text resources are respectively stored in different databases. The preloading of the contract resource data by the second thread to obtain a file stream and cache the file stream includes: Through the concurrent operation of the second thread, the text resources and the non-text resources are loaded from the different databases respectively; Each time the contract resource data is preloaded, it is converted into a file stream for caching.

4. The method for generating a contract text according to claim 2, characterized in that: The step of preloading the contract resource data through the second thread to obtain a file stream and cache the file stream includes: preloading the contract resource data one by one through the second thread; Each time the contract resource data is preloaded, it is converted into a file stream for caching.

5. The method for generating a contract text according to claim 1, characterized in that: The acquiring basic contract information of the target contract text through the first thread includes: Displaying the information to be input of the contract template content through the first thread, wherein the information to be input includes context text of the information to be filled in the contract template content; Acquire, through the first thread, information to be identified based on the information to be input, wherein the information to be identified includes the information to be filled in the contract template content and context text of the information to be filled in; The basic contract information in the information to be identified is determined through the first thread according to the context text of the information to be input.

6. The method for generating a contract text according to claim 1, characterized in that: The obtaining, through the first thread, contract type information of the target contract text to be generated includes: Acquire business parameters of the target contract text to be generated through the first thread; The business parameters are matched with the preset characteristic information of each type of contract text through the first thread to obtain the contract type information of the target contract text.

7. The method for generating a contract text according to any one of claims 1 to 6, characterized in that: After the second thread fills the basic contract information into the preloaded text to generate the target contract text, the method further includes: The target contract text is displayed through the first thread, and the target contract text is stored through the second thread.

8. A device for generating a contract text, characterized in that: include: An information acquisition module, used to acquire contract type information of a target contract text to be generated through a first thread; a preloading module, which is in communication connection with the information acquisition module, and is used to determine the content of the contract template according to the contract type information through the second thread, and preload the content of the contract template to obtain a preloaded text, and at the same time obtain the basic contract information of the target contract text through the first thread, wherein the basic contract information is the information to be filled in the content of the contract template; A text generation module is communicatively connected to the preloading module, and is used to fill the basic contract information into the preloading text through the second thread to generate the target contract text.

9. A computer device, characterized in that: The computer device comprises: one or more processors; A memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the contract text generation method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to execute the steps in the contract text generation method according to any one of claims 1 to 7.