A contract making method and device, electronic equipment and medium
By combining a pre-set language model and an RPA model, the contract creation process is determined and planned, solving the problems of limited automated contract creation methods and low efficiency of manual creation, thus achieving efficient and high-quality contract creation.
Patent Information
- Application Number
- CN202411741420.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In existing technologies, automated contract creation methods are too simplistic and cannot meet the diverse needs of users, resulting in poor contract quality, while manual creation is inefficient.
By combining a pre-defined language model with an RPA model, the system determines whether the contract creation process involves manual steps, plans the creation process, identifies the target RPA model, and generates interactive question-and-answer text, thus achieving an effective combination of automation and manual processing.
It improved the efficiency of contract preparation while ensuring contract quality, effectively combining automation and manual processing, and enhancing the overall efficiency and quality of contract preparation.
Smart Images

Figure CN119670715B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a contract making method and device, electronic equipment and medium. BACKGROUND
[0002] In the current automatic contract making method, a contract file is usually made based on fixed making rules and a contract template. The method mainly fills input data into a fixed contract template to realize automatic contract making. However, in the actual contract automatic making scene, the contract making needs of users are usually diversified. The automatic contract making by using a fixed contract making template has the problem of single mode, and cannot meet the diversified contract making needs of users. The contract generated by automatic making has poor quality. On the contrary, if a contract is made manually, the contract quality is guaranteed, but the contract making efficiency is low.
[0003] Therefore, how to improve the contract making efficiency on the basis of guaranteeing the contract making quality has become a technical problem to be solved by the technical personnel in the field. SUMMARY
[0004] Therefore, in order to improve the contract generation quality on the basis of guaranteeing the contract making efficiency, the embodiments of the present application provide a contract making method and device, electronic equipment and medium.
[0005] The embodiments of the present application disclose the following technical solutions:
[0006] In a first aspect, the embodiments of the present application provide a contract making method, comprising:
[0007] determining whether the making process of the target contract involves a manual processing step according to a preset language model and a target contract making need from a user end;
[0008] when it is determined that the manual processing step is involved, making process planning is performed according to the preset language model and the contract making need, a first target RPA model and a target interactive question and answer text are determined, the target interactive question and answer text is generated based on the manual processing step, and the first target RPA model is used to automatically execute a contract making step before the manual processing step;
[0009] the first target RPA model is called based on the preset language model, and a second target RPA model is determined according to question and answer response data output by the user end for the target interactive question and answer text, the second target RPA model is used to automatically execute a contract making step after the manual processing step;
[0010] After the first target RPA model is executed, the second target RPA model and the question and answer response data are called based on the preset language model to generate the target contract.
[0011] In a possible implementation, the determining whether the production process of the target contract involves the manual processing step according to the preset language model and the target contract production requirement comprises:
[0012] The target contract production requirement is analyzed by the preset language model to determine a plurality of target production steps for the target contract.
[0013] The target production steps are analyzed to determine whether the manual processing step exists in each target production step.
[0014] In a possible implementation, the preset language model comprises an RPA model function description set, and the RPA model function description set comprises a contract production function description corresponding to each of a plurality of RPA models respectively, each RPA model being used to execute a single contract production step.
[0015] The first target RPA model and the target interactive question and answer text are determined according to the preset language model and the contract production requirement when it is determined that the manual processing step is involved, comprising:
[0016] The manual processing step is analyzed by the preset language model to obtain the target interactive question and answer text.
[0017] The target production steps are planned by the preset language model and the contract production requirement to obtain a target contract production process.
[0018] The first production step before the manual processing step is determined according to the target contract production process and the manual processing step.
[0019] The RPA model having the same production function as the first production step is determined as the first target RPA model based on the contract production function description of each RPA model in the RPA model function description set.
[0020] In a possible implementation, the calling the first target RPA model based on the preset language model comprises:
[0021] When the number of the first target RPA models is not less than two, a first calling sequence for the first target RPA models is determined according to the target contract production process and the contract production function descriptions of the first target RPA models;
[0022] The first target RPA models are called from a preset RPA model set based on the first calling sequence.
[0023] In a possible implementation, before the first target RPA model is called based on the preset language model and the second target RPA model is determined according to the question and answer response data output by the user terminal for the target interactive question and answer text, the method further includes:
[0024] A calling sequence of a third target RPA model in the target contract production process is acquired in real time, and a working state of the third target RPA model is an executing state;
[0025] A contract production progress of the target contract is generated according to the calling sequence and the target contract production process.
[0026] The contract production progress is taken as input data of the preset language model to perform first text optimization processing on the target interactive question and answer text to be sent to the user terminal.
[0027] In a possible implementation, before the first target RPA model is called based on the preset language model and the second target RPA model is determined according to the question and answer response data output by the user terminal for the target interactive question and answer text, the method further includes:
[0028] A historical contract production record corresponding to a user identifier of the user terminal is determined according to the user identifier.
[0029] The historical contract production record is taken as input data of the preset language model to perform second text optimization processing on the target interactive question and answer text to be sent to the user terminal.
[0030] In a possible implementation, the method further includes:
[0031] Contract template data is acquired.
[0032] The contract template data is processed to obtain a model training sample for the preset language model, and the model training sample includes a plurality of contract categories and contract terms corresponding to each contract category.
[0033] In a second aspect, an embodiment of the present application provides a contract production apparatus, including:
[0034] a judgment module, configured to determine whether a production process of a target contract involves a manual processing step according to a preset language model and a contract production requirement from a user terminal;
[0035] a flow planning module, configured to, when it is determined that the production process involves the manual processing step, perform production flow planning according to the preset language model and the contract production requirement, determine a first target RPA model and a target interactive question and answer text; the target interactive question and answer text is generated based on the manual processing step, and the first target RPA model is used to automatically execute a contract production step before the manual processing step;
[0036] a first calling module, configured to call the first target RPA model based on the preset language model, and determine a second target RPA model according to question and answer response data output by the user terminal for the target interactive question and answer text; the second target RPA model is used to automatically execute a contract production step after the manual processing step;
[0037] a second calling module, configured to, after the first target RPA model is executed, call the second target RPA model and the question and answer response data based on the preset language model to generate the target contract.
[0038] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor, a memory and a device bus;
[0039] The processor and the memory are connected through the device bus;
[0040] The memory is configured to store one or more programs, the one or more programs comprising instructions that, when executed by the processor, cause the processor to perform any possible contract production method in the first aspect.
[0041] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium having a computer program stored thereon, the program being executed by a processor to implement any possible contract production method in the first aspect.
[0042] Compared with the prior art, the present application has the following beneficial effects: the contract manufacturing method, device, electronic equipment and medium provided by the embodiments of the present application first need to analyze the target contract manufacturing demand of the user end based on a preset language model to determine whether the target contract manufacturing process involves manual processing steps. When it is determined that the contract manufacturing process involves manual processing steps, the preset language model is combined with the specific contract manufacturing demand to plan the manufacturing process, thereby determining a first target RPA model and a target interactive question and answer text. The first target RPA model is used to automatically execute the contract manufacturing steps before the manual processing steps, and the target interactive question and answer text is output by the preset language model to the user end, thereby executing the manual processing steps in the contract manufacturing process. Subsequently, the first target RPA model is called by the preset language model, and a second target RPA model is determined according to the corresponding question and answer response data. Finally, when the first target RPA model is executed, the second target RPA model after the manual processing step is called again by the preset language model, thereby completing the manufacturing of the target contract.
[0043] In the above method, by using the combination of the RPA model and the preset language model, the processes that can be automatically executed in the contract manufacturing process are allocated to the RPA model to complete, and the steps that need to involve manual processing are realized by the real-time interaction between the preset language model and the user end. In this way, the effective combination of automatic contract manufacturing and manual contract manufacturing is realized, and the contract manufacturing efficiency can be effectively improved by the automatic manufacturing of the contract by the RPA model. At the same time, the calling sequence between the RPA models and the specific manual processing steps are completed by the preset language model, thereby jointly guaranteeing the quality of the contract based on the model calling sequence and the manual processing, so as to effectively improve the contract manufacturing efficiency while guaranteeing the quality of the contract. BRIEF DESCRIPTION OF DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0045] Figure 1 A flowchart of a contract manufacturing method provided by an embodiment of the present application;
[0046] Figure 2 A flowchart of another contract manufacturing method provided by an embodiment of the present application;
[0047] Figure 3A flowchart of a first text optimization process on a target interactive Q&A text is provided for the embodiments of the present application.
[0048] Figure 4 A flowchart of a second text optimization process on a target interactive Q&A text is provided for the embodiments of the present application.
[0049] Figure 5 A structure diagram of a contract making system in an actual application scenario is provided for the embodiments of the present application.
[0050] Figure 6 A structure diagram of a contract making device is provided for the embodiments of the present application.
[0051] Figure 7 A structure diagram of a contract making electronic device is provided for the embodiments of the present application. DETAILED DESCRIPTION
[0052] To make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the embodiments and the accompanying drawings. It should be particularly noted that the embodiments described in the embodiments of the present application are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work fall within the scope of protection of the present application.
[0053] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be understood as the usual meanings understood by those of ordinary skill in the art to which the present application belongs. The terms "first", "second", and similar terms used in the embodiments of the present application do not represent any order, quantity, or importance, but are only used to distinguish different components. The terms "include" or "contain" and similar terms mean that the elements or objects before the terms cover the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "up", "down", "left", "right", and the like are only used to represent relative positional relationships, and when the absolute positions of the described objects change, the relative positional relationships may also change accordingly.
[0054] To make the following embodiments clear, first, the technical terms to be used in the embodiments of the present application are introduced:
[0055] LLM (Large Language Model) refers to deep learning models with hundreds of millions to tens of billions of parameters that are trained on large amounts of text data collected on the Internet. These models are usually based on the Transformer architecture and can generate coherent and contextually relevant text for complex language understanding tasks.
[0056] RPA (Robotic Process Automation) is a software technology that uses robotic software to simulate and automate repetitive and rule-based tasks performed by humans on computer devices. RPA can interact between various applications and devices, thereby improving work efficiency and accuracy.
[0057] As described above, in the current contract automation generation method, the contract file is usually generated based on fixed generation rules and contract templates. The method mainly fills the input data into the fixed contract template to realize the automation of contract generation. However, in the actual contract automation generation scenario, the user's contract generation requirements are often diversified, and the way of automatically generating contracts through fixed contract generation templates has the problem of single mode, which cannot meet the diversified contract generation requirements of users, and the quality of the contract generated by the automation is poor. On the contrary, if the contract is generated manually, although the quality of the contract is guaranteed, there is a problem of low contract generation efficiency.
[0058] To solve the above problems, the contract generation method, device, electronic equipment and medium provided by the embodiments of the present application are provided. In the contract generation method, first, the target contract generation requirements of the user end need to be analyzed based on the preset language model to determine whether the target contract generation process involves manual processing steps. When it is determined that the contract generation process involves manual processing steps, the preset language model is combined with the specific contract generation requirements to plan the generation process, thereby determining the first target RPA model and the target interactive question and answer text. The first target RPA model is used to automatically execute the contract generation steps before the manual processing steps, and the target interactive question and answer text is output by the preset language model to the user end, thereby executing the manual processing steps in the contract generation process. Then, the first target RPA model is called by the preset language model, and the second target RPA model is determined according to the corresponding question and answer response data. Finally, when the first target RPA model is executed, the second target RPA model after the manual processing step is called again by the preset language model, thereby completing the generation of the target contract.
[0059] In the above method, by using the combination of the RPA model and the preset language model, the processes that can be automatically executed in the contract making process are allocated to the RPA model to complete, and the links that need to involve manual processing are realized by the real-time interaction between the preset language model and the user end. In this way, the effective combination of automatic contract making and manual contract making is realized. Through the automatic making of the contract by the RPA model, the contract making efficiency can be effectively improved. At the same time, the calling sequence between the RPA models and the specific manual processing links are completed by the preset language model, so as to jointly guarantee the quality of the contract based on the model calling sequence and the manual processing, thereby realizing the effective improvement of the contract making efficiency while guaranteeing the quality of the contract.
[0060] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0061] Next, the contract making method provided in the embodiments of the present application will be introduced in conjunction with specific embodiment drawings. Referring to Figure 1 , the figure is a flowchart of a contract making method provided in an embodiment of the present application, which specifically includes the following steps:
[0062] S101: According to the preset language model and the target contract making demand from the user end, it is judged whether the making process of the target contract involves manual processing steps.
[0063] The contract making method provided by the embodiments of the present application is applied to an interactive terminal with a preset language model. The interactive terminal interacts with a user terminal through a display and a speaker on the terminal. The user can output a specific target contract making demand on the display or transmit the target contract making demand to the interactive terminal in a voice communication manner, so that the preset language model determines whether the making process of the target contract involves an artificial processing step according to the specific target contract making demand. In an actual application scenario, the target contract making demand initially input by the user can be imperfect or have some defects. At this time, the preset language model can analyze the target contract making demand input by the user to determine whether the target contract making demand of the user is perfect. When it is determined that the contract making demand of the user is not perfect or has defects, the preset language model can output interactive text to the user and receive data fed back by the user through the semantic understanding ability and the text interaction ability of the preset language model, so as to perfect the target contract making demand and provide a good data basis for subsequent contract making process determination.
[0064] In an actual contract making process, since the types of contracts are diverse, the corresponding contract making processes also have many categories. For a traditional contract, the corresponding contract making process includes contract text extraction, contract element extraction, contract comparison and the like, and for a contract with specific legal requirements, the corresponding contract making process additionally includes contract legal risk review, contract property review and the like. Different making processes or review processes can have many sub-processes inside, for example, for a review process P i, Corresponding to the sub-processes of P i , there can be (P i1, P i2, P i3 ), if P i2 is a step that needs to be processed by an artificial person, the execution of P i3 needs to refer to the artificial processing result of P i2 .
[0065] Therefore, in order to prevent the steps that need to be processed by an artificial person from being executed in an automated manner and thus affecting the contract quality in the contract making process, in the initial step of the contract making process in the embodiments of the present application, the preset language model needs to analyze the target contract making demand input by the user to determine whether the making process of the target contract involves an artificial processing step.
[0066] Specifically, when the interactive terminal for making a contract receives a target contract making demand, the target contract making demand is formatted by data processing in the interactive terminal to extract the target contract making demand into data meeting the format requirements of a preset language model. Then, the target contract making demand is analyzed by the preset language model, and the type of the target contract and a plurality of target making steps for the target contract are determined by the powerful language analysis and language understanding capability of the preset language model. For example, for a contract type with certain legal requirements, the contract making steps can include contract text extraction, contract element extraction, contract comparison, contract legal risk review, contract property review, and the like.
[0067] Then, the specific process of each target making step is analyzed to determine whether each operation step involves a manual processing step.
[0068] When determining whether the target making step involves a manual processing step, the determination can be made according to whether the step involves specific legal and regulatory requirements. For example, if a target making step involves specific legal and regulatory requirements, the execution of the step often needs to be permitted by the user end before execution, and therefore, such making step can be determined as a step involving manual processing. On the other hand, the determination can also be made according to the complexity of the contract clauses involved in the step. When the number of contract clauses involved in the step is high, the permission of the user end is also needed as the basis for execution. The determination method of the manual processing step is not limited and will not be described in detail.
[0069] In particular, in the application scenario of the embodiments of the present application, the preset language model can use an LLM model or other large language models. The core is to use the semantic understanding function and semantic analysis technology of the large language model to determine the making steps required by the target contract. The type of the language model is not limited in the embodiments of the present application.
[0070] S102: When it is determined that the manual processing step is involved, a making process is planned according to the preset language model and the contract making demand, a first target RPA model and a target interactive question and answer text are determined; the target interactive question and answer text is generated based on the manual processing step, and the first target RPA model is used to automatically execute the contract making steps before the manual processing step.
[0071] In a case where it is determined that the production process of the target contract production involves an artificial processing step, in order to improve the contract production efficiency while ensuring the smooth execution of the artificial processing step, the production process of the contract as a whole needs to be planned by the preset language model to determine the production steps before the artificial processing step and determine the first target RPA model corresponding to these steps, so as to automatically execute the production steps before the artificial processing step through the automatic processing function of the RPA model. Since the RPA model can simulate and automatically execute the production steps and tasks with repeatability and regularity in the contract production process through the robot software, the production steps before the artificial processing step can be completed by the first target RPA model, thereby improving the production efficiency of the contract.
[0072] Meanwhile, the preset language model also needs to perform text analysis on the step involving artificial processing to generate the target interactive question and answer text that needs to be sent to the user end, so as to promote the execution process of the artificial processing step in the process of determining the first target RPA model, thereby maximizing the production efficiency of the contract while ensuring the quality of the contract.
[0073] Next, the process of determining the first target RPA model and the target interactive question and answer text in step S102 will be introduced in combination with specific embodiments and drawings.
[0074] Referring to Figure 2 The figure is a flowchart of another contract production method provided by the embodiments of the present application, which specifically includes the following steps:
[0075] S1021: performing language analysis on the artificial processing step based on the preset language model to obtain the target question and answer interactive text.
[0076] In parallel, the determination process of the preset language model for the target interactive question and answer text and the first target RPA model is carried out in parallel, which can determine the first target RPA model that needs to be called subsequently while determining the specific target question and answer interactive text of the user end, thereby maximizing the contract production efficiency.
[0077] Specifically, the target question and answer interactive text needs to be obtained by the preset language model performing language analysis on the artificial processing step. In the production process of the contract, the step involving artificial processing often includes complex legal review and risk assessment processes, etc. Therefore, by performing language analysis on these complex processing steps by the preset language model, the steps that need to be processed by artificial in these processing steps can be identified, such as issuing a permit license, etc. The preset language model can generate the target question and answer interactive text by language conversion on these steps that need to be processed by artificial.
[0078] In the process of making the target contract, the interactive terminal outputs the text information in the target question and answer interactive text to the user terminal through the display screen or voice playback, so as to facilitate the subsequent contract making process according to the response of the user terminal, thereby guaranteeing the quality of the contract.
[0079] S1022: The target contract making process is obtained by making process planning for a plurality of target making steps through the preset language model and the contract making demand.
[0080] The first target RPA model is used to execute the making step before the artificial processing step, in order to accurately execute the step before the artificial processing step, it is necessary to determine the target contract making process for the whole target contract.
[0081] The target contract making process is determined by the making process planning of the contract making demand by the preset language model, as described above, the preset language model can determine the contract making steps involved in the target contract according to the specific contract making demand of the user terminal. On this basis, through the powerful context understanding ability and keyword learning ability of the preset language model, the process planning is carried out for a plurality of target making steps which have been determined, so as to have the target contract making process with intuitive execution sequence.
[0082] S1023: The first making step before the artificial processing step is determined according to the target contract making process and the artificial processing step.
[0083] Correspondingly, after determining the target contract making process, the execution sequence of the artificial processing step in the target contract making process is queried, so as to determine the first making step before the artificial processing step. It needs to be particularly pointed out that, since different contract types have great difference in processing process, there may be single or multiple steps before the execution sequence of the artificial processing step, so the number of the first making step is also determined according to the actual situation, and there is no specific fixed value for the number.
[0084] S1024: Based on the contract making function description of each RPA model in the RPA model function description set, the RPA model with the same making function as the first making step is determined as the first target RPA model.
[0085] Although the pre-configured RPA model in the embodiment of the present application can automatically execute the repetitive and rule-based production steps in the contract production process, each RPA model only corresponds to a specific contract production step. In order to ensure the correct calling of the RPA model, the embodiment of the present application pre-configures an RPA model function description set for describing the contract production function of the RPA model, and sets it in the preset language model as a reference basis for determining the first target RPA model. In this RPA model function description set, each RPA model has a separate contract production function description. Therefore, when the preset language model needs to select the first target RPA model before the execution order of the artificial processing step, the RPA models with the same production function as the first production step can be selected through the contract production function description of each RPA model and the language analysis of the first contract production step. These RPA models are used to automatically execute these production steps, thereby improving the efficiency of contract production.
[0086] The above is the introduction of the determination method of the first target RPA model and the target interactive question and answer text in step S102. Next, the determination method of the first target RPA model and the target interactive question and answer text in step S102 will be introduced in combination with Figure 1 The contract production method in the embodiment of the present application will be introduced:
[0087] S103: calling the first target RPA model based on the preset language model, and determining a second target RPA model according to the question and answer response data output by the user end for the target interactive question and answer text; the second target RPA model is used to automatically execute the contract production step after the artificial processing step.
[0088] As known from the foregoing, when the preset language model determines the first target RPA model, it needs to determine the first target RPA model before the execution order of the artificial processing step according to the determined target contract production process and the contract production function description of each RPA model in the RPA model function description set.
[0089] Therefore, when the model number of the first target RPA model is not less than 2 (i.e. there are multiple execution steps before the artificial processing step) when the preset language model calls the first target RPA model, the target language model needs to determine the first calling order for multiple first target RPA models according to the contract production function description of each first target RPA model and the target contract production process, and calls the first target RPA model from the preset RPA model set based on the first calling order, aiming to take the production process of the target contract as the calling order of the RPA model, so as to reasonably call each RPA model to realize the automatic execution of part of the contract production steps.
[0090] Meanwhile, the preset language model transmits the target interactive text to the user end, receives the question and answer response data fed back by the user end in real time while calling the first target RPA model to make the contract automatically, and analyzes the question and answer response data to determine the decision made by the user end in the manual processing step, so as to determine the second target RPA model to be called in subsequent contract automatic making. In this process, the preset language model calls the first target RPA model and determines the second target RPA model according to the question and answer response data in parallel. In the initial contract making, the preset language model can still interact with the user end and determine the second target RPA model to be called according to the question and answer response data fed back by the user end, so as to maximize the improvement of contract making efficiency.
[0091] The preset RPA model set is a model set set by the embodiment of the application for various contract making steps. The contract making process is decomposed into atomized business processes {P1, P2…}, and a corresponding RPA model is set for each specific contract making step, thereby forming the preset RPA model set R={RPA1, RPA2, PRA3…}. For example, for the contract text extraction, contract element extraction, contract comparison, contract legal risk review, contract financial review and other steps in the contract making step, in the process of constructing the preset RPA model, the repetitive actions of manual processing are simulated through OCR recognition, machine vision and other technologies, and these steps with rules or repetition are converted into machine-controlled automatic process.
[0092] S104: After the execution of the first target RPA model is completed, the second target RPA model and the question and answer response data are called based on the preset language model to generate the target contract.
[0093] Correspondingly, after the first target RPA model is executed, the calling order of the preset language model for the second target RPA model is determined according to the respective contract making function descriptions of the specific contract making process and the second target RPA model, and then the second target RPA model is called in sequence to make the contract automatically, so as to generate the target contract.
[0094] As can be known from the foregoing description, when the preset language model invokes each RPA model to make a contract automatically, the preset language model can determine the calling sequence of each RPA model according to the contract making function description of each RPA model. In a possible implementation, the preset language model can determine the making progress of the target contract according to the calling sequence of the RPA model currently being executed, so as to optimize the interaction with the user end and improve the user experience. Next, the optimization process of the target interactive question and answer text in combination with the making progress of the target contract will be introduced in combination with specific embodiments and drawings.
[0095] Referring to Figure 3 The figure is a flowchart of a first text optimization process of a target interactive question and answer text provided by an embodiment of the present application, which specifically includes the following steps:
[0096] S201: Real-time acquisition of the calling sequence of a third target RPA model in the target contract making process; the working state of the third target RPA model is an executing state.
[0097] S202: Generation of the contract making progress of the target contract according to the calling sequence and the target contract making process.
[0098] S203: Taking the contract making progress as the input data of the preset language model to perform a first text optimization process on the target interactive question and answer text to be sent to the user end.
[0099] In the process of automatically making a target contract, the calling sequence of a third target RPA model being executed can be acquired in real time, and the current contract making progress of the target contract can be determined according to the calling sequence and the target contract making process. When the preset language model generates a target interactive question and answer text according to a manual processing step, the real-time contract making progress of the target contract is taken as the optimization reference data of the target interactive text to perform a first text optimization process on the target interactive text, so as to optimize the interaction between the preset language model and the user end.
[0100] In another possible implementation, if the user end has a historical contract making record in the current interactive terminal, the target interactive question and answer text sent by the preset language model to the user end can be further optimized according to the historical contract making record of the user end, so as to optimize the question and answer interaction between the language model and the user end in multiple aspects. For details, please refer to Figure 4 The figure is a flowchart of a second text optimization process of a target interactive question and answer text provided by an embodiment of the present application, which specifically includes the following steps:
[0101] S301: Determine a historical contract making record corresponding to the user identifier of the user terminal according to the user identifier.
[0102] S302: Take the historical contract making record as input data of the preset language model to perform second text optimization processing on the target interactive question and answer text to be sent to the user terminal.
[0103] When the user terminal sends a target contract making demand to the interactive terminal, the historical contract making record corresponding to the user identifier can be queried from the historical contract database through the user identifier contained in the contract making demand. If the historical contract making record of the user exists in the database, the historical contract making record is taken as the optimization reference data for the preset language model to generate the target interactive text, thereby realizing the second text optimization processing on the target interactive question and answer text. In this way, in combination with the above method of performing first text optimization processing on the target interactive question and answer text according to the contract making progress, the question and answer interaction between the preset language model and the user terminal can be optimized from multiple aspects, the question and answer interaction is more accurate, and the production quality of the target contract is thus guaranteed.
[0104] In a possible implementation, in order to enable the preset language model to have better language processing and semantic understanding ability in the application scenario of contract making, the diversity of training samples needs to be ensured. In the embodiment of the present application, the data processing of the training samples can be completed by contract analogy and contract clause division.
[0105] Specifically, in the process of obtaining a large amount of contract template data, a large number of web pages containing contract element keywords can be extracted from the network by a network crawler collection device, and data preprocessing is performed thereon to extract a large amount of contract template data from the web pages containing contract text.
[0106] Further, the contract template data is processed, the contract is automatically disassembled according to the specific category of the contract, the clause label is labeled, the clause big data is generated, and finally the training sample for training the above preset language model is formed.
[0107] For example, refer to Figure 5 The figure is a structural schematic diagram of the contract making system in the actual application scenario of the embodiment of the present application. Through the data processing process of each module therein, the format standardization of the user input data can be ensured on the basis of accurate training of the preset language model. At the same time, the contract making function description corresponding to each RPA model is transmitted to the preset language model LLM by the task scheduling engine, so that the language model determines the scheduling order of each RPA, thereby better realizing the automation of the contract making process.
[0108] The embodiment of the present application provides a contract making method, in which, firstly, the target contract making demand of a user end is analyzed based on a preset language model to determine whether the process of making the target contract involves an artificial processing step. When it is determined that the process of making the contract involves an artificial processing step, a preset language model is combined with the specific contract making demand to plan a making process, so as to determine a first target RPA model and a target interactive question and answer text. The first target RPA model is used to automatically execute the contract making step before the artificial processing step, and the target interactive question and answer text is output by the preset language model to the user end, so as to execute the artificial processing step in the contract making process. Then, the first target RPA model is called by the preset language model, and a second target RPA model is determined according to the corresponding question and answer response data. Finally, when the first target RPA model is executed, the second target RPA model after the artificial processing step is called by the preset language model again, so as to complete the making of the target contract.
[0109] In the above method, by using the combination of the RPA model and the preset language model, the processes that can be automatically executed in the contract making process are allocated to the RPA model to be completed, and the links that need to involve artificial processing are realized by the real-time interaction between the preset language model and the user end. In this way, the effective combination of the automatic contract making and the artificial contract making is realized, and the contract making efficiency can be effectively improved by the automatic making of the contract by the RPA model. At the same time, the calling sequence between the RPA models and the specific artificial processing link are completed by the preset language model, so as to jointly guarantee the quality of the contract based on the model calling sequence and the artificial processing, so as to effectively improve the contract making efficiency while guaranteeing the quality of the contract.
[0110] Next, a contract making device provided by the embodiment of the present application is introduced, and the contract making device described below can be correspondingly referred to the contract making method described above.
[0111] Referring to Figure 6 The figure is a structural schematic diagram of a contract making device provided by the embodiment of the present application, which specifically includes the following modules:
[0112] The judgment module 100 is used to determine whether the process of making the target contract involves an artificial processing step according to the preset language model and the target contract making demand from the user end;
[0113] The process planning module 200 is configured to, when determining the artificial processing step, perform process planning according to the preset language model and the contract making demand, determine a first target RPA model and a target interactive question and answer text, the target interactive question and answer text is generated based on the artificial processing step, and the first target RPA model is used to automatically execute a contract making step before the artificial processing step.
[0114] The first calling module 300 is configured to call the first target RPA model based on the preset language model, and determine a second target RPA model according to question and answer response data output by the user terminal for the target interactive question and answer text; the second target RPA model is used to automatically execute a contract making step after the artificial processing step.
[0115] The second calling module 400 is configured to, after the first target RPA model is executed, call the second target RPA model and the question and answer response data based on the preset language model, to generate the target contract.
[0116] Referring to Figure 7 The figure is a structural schematic diagram of a contract making electronic device provided by an embodiment of the application, which includes:
[0117] The memory 11 is configured to store a computer program.
[0118] The processor 12 is configured to, when executing the computer program, implement the steps of a contract making method according to any method embodiment.
[0119] In the embodiment, the device can be a vehicle-mounted computer, a PC (Personal Computer, personal computer), and can also be a terminal device such as a smart phone, a tablet computer, a palm computer, and a portable computer.
[0120] The device can include a memory 11, a processor 12, and a bus 13.
[0121] The memory 11 includes at least one type of readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 can be an internal storage unit of the device in some embodiments, such as a hard disk of the device. The memory 11 can also be an external storage device of the device in other embodiments, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 11 can include both an internal storage unit and an external storage device. The memory 11 can be used to store application software installed in the device and various data, such as program codes for executing the fault prediction method, etc., and to temporarily store data that has been output or will be output. The processor 12 can be a central processing unit (CPU) in some embodiments.
[0122] The processor 12 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments, for running program codes stored in the memory 11 or processing data, such as program codes for executing the contract making method, etc.
[0123] The bus 13 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the figure to represent the bus, but it does not mean that there is only one bus or only one type of bus.
[0124] Further, the device can also include a network interface 14, which can optionally include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), and is usually used to establish a communication connection between the device and other electronic devices.
[0125] Optionally, the device can further comprise a user interface 15, which can include a display, an input unit such as a keyboard, and optionally a standard wired interface, a wireless interface. Optionally, in some embodiments, the display can be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, etc. The display can also be appropriately referred to as a display screen or a display unit, for displaying information processed in the device and for displaying a visualized user interface.
[0126] Figure 7 Only the device with components 11-15 is shown, and those skilled in the art can understand that, Figure 7 The structure shown does not constitute a limitation on the device, and can include fewer or more components than shown, or combine certain components, or different component arrangements.
[0127] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the embodiments of the present application also provide a computer readable storage medium, which stores computer instructions for causing the computer to execute the contract making method of any of the above embodiments.
[0128] The computer readable medium of the embodiments of the present application includes permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.
[0129] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the contract making method of any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which are not described here.
[0130] It should be noted that each of the embodiments of the present specification is described in a progressive manner, and the same or similar parts between the embodiments can be mutually referred to, and each of the embodiments focuses on the differences from other embodiments. In particular, for the method, device, electronic device and medium, since they are basically similar to the method embodiment, they are described more simply, and the relevant parts can refer to the part of the description of the method embodiment. The above-described method, device, electronic device and medium are only illustrative, and the units described as separate components can or can not be physically separated, and the components prompted as units can or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiments according to the actual needs. Those skilled in the art can understand and implement it without creative labor.
[0131] The above describes only one specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any skilled person in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A contract creation method characterized by comprising: The method comprises the following steps: determining whether the production process of the target contract involves manual processing steps according to a preset language model and target contract production requirements from a user terminal; when it is determined that the manual processing steps are involved, planning a production process according to the preset language model and the contract production requirements, determining a first target RPA model and a target interactive question and answer text; the target interactive question and answer text is generated based on the manual processing steps, and the first target RPA model is used to automatically execute the contract production steps before the manual processing steps; based on the preset language model, the first target RPA model is called, and a second target RPA model is determined according to the question and answer response data output by the user terminal for the target interactive question and answer text; the second target RPA model is used to automatically execute the contract production steps after the manual processing steps; after the first target RPA model is executed, the second target RPA model and the question and answer response data are called based on the preset language model to generate the target contract; the preset language model comprises an RPA model function description set, which comprises contract production function descriptions corresponding to each of a plurality of RPA models respectively, and each RPA model is used to execute a single contract production step; when it is determined that the manual processing steps are involved, planning a production process according to the preset language model and the contract production requirements, determining a first target RPA model and a target interactive question and answer text, comprising: performing language analysis on the manual processing steps based on the preset language model to obtain the target interactive question and answer text; planning a production process for a plurality of target production steps based on the preset language model and the contract production requirements to obtain a target contract production process; determining a first production step before the manual processing step according to the target contract production process and the manual processing step; based on the contract production function descriptions of each RPA model in the RPA model function description set, determining an RPA model with the same production function as the first production step as the first target RPA model.
2. The method of claim 1, wherein, determining whether the production process of the target contract involves manual processing steps according to a preset language model and target contract production requirements from a user terminal, comprising: performing requirement analysis on the target contract production requirements based on the preset language model to determine a plurality of target production steps for the target contract; performing process analysis on each target production step to determine whether the manual processing step exists in each target production step.
3. The method of claim 1, wherein, based on the preset language model, the first target RPA model is called, comprising: when the number of the first target RPA model is not less than two, determining a first calling sequence for a plurality of first target RPA models according to the target contract production process and the contract production function descriptions of each first target RPA model; based on the first calling sequence, a plurality of first target RPA models are called from a preset RPA model set.
4. The method of claim 1, wherein, Before the calling the first target RPA model based on the preset language model and determining the second target RPA model according to the question and answer response data output by the user terminal for the target interactive question and answer text, the method further comprises: acquiring a calling sequence of a third target RPA model in the target contract making process; a working state of the third target RPA model is an executing state; generating a contract making progress of the target contract according to the calling sequence and the target contract making process; taking the contract making progress as input data of the preset language model to perform first text optimization processing on the target interactive question and answer text to be sent to the user terminal.
5. The method of claim 1, wherein, Before the calling the first target RPA model based on the preset language model and determining the second target RPA model according to the question and answer response data output by the user terminal for the target interactive question and answer text, the method further comprises: determining a historical contract making record corresponding to a user identifier of the user terminal according to the user identifier; taking the historical contract making record as input data of the preset language model to perform second text optimization processing on the target interactive question and answer text to be sent to the user terminal.
6. The method of claim 1, wherein, The method further comprises: acquiring contract template data; performing data processing on the contract template data to obtain model training samples for the preset language model; the model training samples comprise a plurality of contract categories and contract terms individually corresponding to each of the contract categories.
7. A contract creation apparatus characterized by comprising: Comprise: a judgment module configured to determine whether a making process of the target contract involves an artificial processing step according to a preset language model and a target contract making demand from a user terminal; a process planning module configured to, when it is determined that the making process involves the artificial processing step, perform making process planning according to the preset language model and the contract making demand, determine a first target RPA model and a target interactive question and answer text, the target interactive question and answer text being generated based on the artificial processing step, and the first target RPA model being used to automatically execute a contract making step before the artificial processing step; a first calling module configured to call the first target RPA model based on the preset language model and determine a second target RPA model according to question and answer response data output by the user terminal for the target interactive question and answer text, the second target RPA model being used to automatically execute a contract making step after the artificial processing step; a second calling module configured to, after the first target RPA model is executed, call the second target RPA model and the question and answer response data based on the preset language model to generate the target contract; the preset language model comprises an RPA model function description set, the RPA model function description set comprises contract making function descriptions individually corresponding to a plurality of RPA models respectively, and each of the RPA models is used to execute a single contract making step; the process planning module is specifically configured to: language analysis on the artificial processing step based on the preset language model to obtain the target question and answer interaction text; planning a target contract production process for a plurality of target production steps through the preset language model and the contract production requirement; determining a first production step before the artificial processing step according to the target contract production process and the artificial processing step; based on the contract production function description of each RPA model in the RPA model function description set, determining an RPA model with the same production function as the first production step as the first target RPA model.
8. An electronic device, comprising: The device comprises a processor, a memory and a device bus; The processor and the memory are connected through the device bus; The memory is used to store one or more programs, the one or more programs comprising instructions which, when executed by the processor, cause the processor to perform the contract production method of any one of claims 1-6.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the contract production method of any one of claims 1-6.
Citation Information
Patent Citations
Legal affair contract change identification method and device, equipment and medium
CN117574905A
Electronic device and information providing method thereof
KR102627740B1