CN114493551A - Contract generation method and device, electronic equipment and storage medium - Google Patents
Contract generation method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114493551A CN114493551A CN202210308599.XA CN202210308599A CN114493551A CN 114493551 A CN114493551 A CN 114493551A CN 202210308599 A CN202210308599 A CN 202210308599A CN 114493551 A CN114493551 A CN 114493551A
- Authority
- CN
- China
- Prior art keywords
- contract
- information
- protocol
- data
- key
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/103—Workflow collaboration or project management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/02—Banking, e.g. interest calculation or account maintenance
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Human Resources & Organizations (AREA)
- Accounting & Taxation (AREA)
- Theoretical Computer Science (AREA)
- Economics (AREA)
- Marketing (AREA)
- Finance (AREA)
- Entrepreneurship & Innovation (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Operations Research (AREA)
- Development Economics (AREA)
- Technology Law (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application discloses a contract generation method and device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a contract generation request message; the contract generation request message comprises contract basic information, protocol information and contract data; detecting whether the contract basic information is valid or not based on the contract number in the contract basic information; if the contract basic information is detected to be effective, detecting whether the contract information is correct or not based on the key information of the contract in the contract information; if the agreement information is detected to be effective, analyzing the contract data into a plurality of groups of key value pairs to obtain a contract data set; verifying and processing the format of the data in the same data set by using a preset rule; finding out a target protocol template matched with the protocol key information in the protocol information; and merging the target agreement template and the contract data set to obtain a contract file.
Description
Technical Field
The present application relates to the field of electronic contract generation technologies, and in particular, to a contract generation method and apparatus, an electronic device, and a storage medium.
Background
With the continuous development of the internet era, electronic contracts are used for replacing the existing paper contracts for part of the business of banks. Electronic contracts in banks refer primarily to agreements between two or more parties to establish, alter, terminate property civil rights obligations electronically over electronic information networks.
Currently, a plurality of systems usually exist in banks, and different business scenes need different signed electronic contracts. So to meet the respective requirements, for different types of contracts, respective contract generation scripts are usually developed in the corresponding systems. Subsequently, the corresponding type of electronic contract can be generated by calling the corresponding interface in the corresponding system.
However, because of the numerous types of contracts, the conventional method is not only inconvenient for the same management, but also relatively low in the reuse rate of the interfaces and the data tables, and when the contracts are changed, the interfaces need to be redefined, the data tables need to be upgraded, and the like, so that the whole process is complicated, and the workload is relatively large.
Disclosure of Invention
Based on the defects of the prior art, the application provides a contract generation method and device, electronic equipment and a storage medium, so as to solve the problems of low reuse rate and complex management in the prior art.
In order to achieve the above object, the present application provides the following technical solutions:
the first aspect of the present application provides a contract generating method, including:
receiving a contract generation request message; the contract generation request message comprises contract basic information, protocol information and contract data;
detecting whether the contract basic information is valid or not based on the contract number in the contract basic information;
if the contract basic information is detected to be effective, detecting whether the contract information is correct or not based on the key information of the contract in the contract information;
if the agreement information is detected to be effective, analyzing the contract data into a plurality of groups of key value pairs to obtain a contract data set;
verifying and processing the format of the data in the same data set by using a preset rule;
finding out a target protocol template matched with the protocol key information in the protocol information;
and merging the target agreement template and the contract data set to obtain a contract file.
Optionally, in the above method for generating a contract, the detecting whether the contract base information is valid based on the contract number in the contract base information includes:
identifying the contract basic information in the contract generation request message;
analyzing key contract information from the contract basic information; wherein the key contract information at least comprises a contract number;
searching a target parameter record corresponding to the contract number from a contract type parameter table;
detecting whether the contract state in the target parameter record is effective or not; and if the contract state in the target parameter record is valid, determining that the contract basic information is valid.
Optionally, in the above method for generating a contract, the detecting whether the agreement information is error-free based on the agreement key information in the agreement information includes:
analyzing the protocol key information from the protocol information; the protocol key information at least comprises a protocol type number and a version number;
matching target configuration information corresponding to the protocol key information from a protocol template configuration table;
and detecting whether the protocol information is error-free or not based on the target configuration information.
Optionally, in the above method for generating a contract, the preset rule includes a plurality of verification rules and a plurality of format processing rules, and the verifying and format processing the data in the identical data set by using the preset rule includes:
according to the contract type in the contract basic information, searching out each corresponding check rule and format processing rule from a contract field configuration table;
verifying corresponding field data in the contract data set by using the verification rules respectively;
and carrying out format processing on the data of the corresponding type in the contract data set by using each format processing rule.
Optionally, in the above method for generating a contract, after the verifying and formatting the data in the contract data set by using the preset rule, the method further includes:
storing the contract basic information as a record in a contract detail table;
storing the protocol information as a record in a protocol detail table;
and respectively storing the field name of each field, the value corresponding to the field and the contract number as a record in a contract detail table for each field in the contract data set.
Optionally, in the above method for generating a contract, the merging the target agreement template and the contract data set to obtain a contract document includes:
and for each group of key value pairs in the contract data set, filling values in the key value pairs to the positions of variable names of the key value pairs in the target protocol template, and setting fonts and watermarks corresponding to the target protocol template to obtain a contract file.
A second aspect of the present application provides a contract generation apparatus, including:
a receiving unit, configured to receive a contract generation request message; the contract generation request message comprises contract basic information, protocol information and contract data;
a contract information checking unit, configured to detect whether the contract basic information is valid based on a contract number in the contract basic information;
the agreement information checking unit is used for detecting whether the agreement information is correct or not based on the agreement key information in the agreement information if the contract basic information is detected to be valid;
the contract data analysis unit is used for analyzing the contract data into a plurality of groups of key value pairs to obtain a contract data set if the protocol information is detected to be valid;
the contract data processing unit is used for verifying and processing the format of the data in the contract data set by using a preset rule;
the template searching unit is used for searching a target protocol template matched with the protocol key information in the protocol information;
and the merging unit is used for merging the target protocol template and the contract data set to obtain a contract file.
Optionally, in the above contract generating apparatus, the contract information verifying unit includes:
an identification unit, configured to identify the contract basic information in the contract generation request message;
the first analysis unit is used for analyzing key contract information from the contract basic information; wherein the key contract information at least comprises a contract number;
the parameter record searching unit is used for searching a target parameter record corresponding to the contract number from a contract type parameter table;
the state detection unit is used for detecting whether the contract state in the target parameter record is valid or not; and if the contract state in the target parameter record is valid, determining that the contract basic information is valid.
Optionally, in the above contract generating apparatus, the agreement information verifying unit includes:
the second analysis unit is used for analyzing the protocol key information from the protocol information; the protocol key information at least comprises a protocol type number and a version number;
the matching unit is used for matching target configuration information corresponding to the protocol key information from a protocol template configuration table;
and the detection unit is used for detecting whether the protocol information is error-free or not based on the target configuration information.
Optionally, in the above-mentioned contract generating apparatus, the preset rule includes a plurality of verification rules and a plurality of format processing rules, and the contract data processing unit includes:
the rule searching unit is used for searching out corresponding checking rules and format processing rules from a contract field configuration table according to the contract type in the contract basic information;
the contract data checking unit is used for checking the corresponding field data in the contract data set by using each checking rule;
and the format processing unit is used for performing format processing on the data of the corresponding type in the contract data set by using each format processing rule.
Optionally, the contract generating apparatus further includes:
a first storage unit for storing the contract basic information as a record in a contract detail table;
the second storage unit is used for storing the protocol information as a record in a protocol detail table;
and a third storage unit, configured to store, as one record, a field name of each field, a value corresponding to the field, and the contract number for each field in the contract data set, into a contract detail table.
Optionally, in the above contract generating apparatus, the merging unit includes:
and the merging subunit is used for filling values in the key value pairs to positions of variable names of the key value pairs in the target protocol template aiming at each group of key value pairs in the contract data set, and setting fonts and watermarks corresponding to the target protocol template to obtain the contract file.
A third aspect of the present application provides an electronic device comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, and when the program is executed, the program is specifically configured to implement the contract generating method according to any one of the above items.
A fourth aspect of the present application provides a computer storage medium for storing a computer program which, when executed, implements a contract generation method as described in any one of the above.
According to the contract generation method, the request message is generated by receiving the contract. The contract generation request message includes contract basic information, agreement information and contract data. And then detecting whether the contract basic information is effective or not based on the contract number in the contract basic information. If the contract basic information is detected to be effective, whether the contract information is correct or not is detected based on the contract key information in the contract information, and therefore the relevant information is ensured to be effective and available. Therefore, when the agreement information is detected to be effective, the contract data is analyzed into a plurality of groups of key value pairs to obtain a contract data set. And the data in the contract data set is verified and formatted by using a preset rule so as to ensure that the contract data meets the requirements and can be adapted to the protocol template. And finally, searching a target protocol template matched with the protocol key information in the protocol information, and combining the target protocol template and the contract data set to obtain a contract file. Therefore, the generation method applicable to all types of contracts is realized, so that not only is a plurality of interfaces not required to be arranged, but also multiplexing can be carried out, the workload during subsequent management and change is greatly reduced, and the convenience of management and change is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method for generating a contract according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a method for detecting whether contract basic information is valid according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for detecting whether protocol information is error-free according to an embodiment of the present disclosure;
fig. 4 is a flowchart of a method for checking and processing formats of a same data set according to an embodiment of the present application;
fig. 5 is a flowchart of a method for storing data in a contract generation request message according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a contract generation apparatus provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In this application, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the present application provides a method for generating a contract, as shown in fig. 1, including:
s101, receiving a contract generation request message, wherein the contract generation request message comprises contract basic information, agreement information and contract data.
Specifically, when an electronic contract is required to be signed with a client, business personnel can input related information through the provided unified interface so as to send the contract to generate a request message by utilizing the input related information.
The contract generation request message comprises contract basic information, malicious information and contract data. The contract basic information refers to basic information related to the contract, and specifically may include a contract number, a client number, and the like. The agreement information is the relevant information of the contract agreement, such as the agreement type number, the agreement version, etc. The contract basic information and the laundry information are fixedly filled contents. The contract data is the specific content in the contract text, for example, taking a borrowing contract as an example, the contract data may include a borrower, a borrowing account, a borrowing amount, and the like. The contract data is made up of a list of variable parameters. Thus, for a request message, what it includes may be represented as shown in table 1.
TABLE 1
S102, detecting whether the contract basic information is effective or not based on the contract number in the contract basic information.
To manage different types of contracts, parameters for each type of contract are maintained. Therefore, whether the input contract basic information is valid or not can be determined according to the maintained parameters.
Optionally, the maintained parameters may include a contract status, so that the corresponding parameters may be found based on the contract number in the contract basic information, and whether the contract basic information is valid is determined by using the found parameters.
If it is detected that the contract base information is valid, step S103 is executed. Alternatively, if it is detected that the contract basic information is invalid, the user may be prompted that the contract basic information input is invalid.
Optionally, in another embodiment of the present application, a specific implementation manner of step S102, as shown in fig. 2, includes:
s201, identifying contract basic information in the contract generation request message.
Alternatively, the contract basic information in the contract generation request message may be identified according to the positions of various types of data in the contract generation request message, and then step S202 is performed.
S202, key contract information is analyzed from the contract basic information.
The key contract information at least includes a contract number, and certainly may also include information such as a customer number and a project number.
S203, searching a target parameter record corresponding to the contract number from the contract type parameter table.
In the implementation of the application, the parameters of different contracts are respectively recorded in the contract type parameter table as different records. Each parameter record includes information such as a corresponding contract number, for example, as shown in table 2 below.
TABLE 2
Therefore, the corresponding parameter record can be found according to the contract label, and the parameter record is used as the target parameter record. It should be noted that, if the corresponding parameter record cannot be found, it is determined that the input contract basic information is incorrect, and at this time, the contract basic information is also determined to be invalid.
And S204, detecting whether the contract state in the target parameter record is effective.
Wherein, the contract status in the target parameter record is used to record whether the contract is in a valid usable status, so when the contract status is valid, it is determined that the contract base information is valid.
S103, detecting whether the protocol information is correct or not based on the protocol key information in the protocol information.
Because the agreement information is consistent with the contract basic information and needs to be fixedly input, after the contract basic information is detected to be effective, whether the agreement information is correct or not needs to be detected.
The protocol key information refers to the information which is main in the protocol information and can distinguish different protocols.
If it is detected that the protocol information is correct, step S104 is executed. Also optionally, if the protocol information is detected to be erroneous, a prompt message may be fed back to the user.
Specifically, in an embodiment of the present application, a specific implementation manner of step S103, as shown in fig. 3, includes:
s301, analyzing the protocol key information from the protocol information.
The protocol key information at least comprises a protocol type number and a version number.
S302, matching target configuration information corresponding to the protocol key information from the protocol template configuration table.
Also, in the embodiment of the present application, related information of different protocols is maintained in a protocol template configuration table, and each protocol corresponds to one record, and each record at least includes protocol key information of each field, so that it is possible to match target configuration information corresponding to the protocol key information and detect whether the protocol information is error-free based on the target configuration information.
S303, detecting whether the protocol information is correct or not based on the target configuration information.
And S104, analyzing the contract data into a plurality of groups of key value pairs to obtain a contract data set.
It should be noted that, in order to facilitate filling the contract data into the agreement template, omitting the data, and the like, the contract data mostly exists in a key-value pair manner, and may specifically include a field name and a specific value composition. Accordingly, when the contract data is analyzed, the contract data is analyzed into a plurality of groups of key value pairs, and the obtained key value pairs are stored as a contract data set. The resulting data set is shown, for example, in table 3.
TABLE 3
And S105, verifying and formatting the data in the same data set by using a preset rule.
Because the data in the contract is required by the range, format and the like, and the contract data entered by the user may not meet the requirements, in the embodiment of the application, corresponding rules are set in advance for the fields of the contract data, so as to check whether the data meet the requirements by using the preset rules, and format processing is performed on part of the data with the format not meeting the requirements, thereby realizing the unification of the formats.
Optionally, in another embodiment of the present application, the preset rule includes a plurality of check rules and a plurality of format processing rules. Accordingly, in the embodiment of the present application, a specific implementation manner of step S105, as shown in fig. 4, includes:
s401, according to the contract type in the contract basic information, searching out corresponding check rules and format processing rules from the contract field configuration table.
The check rule is mainly used for checking whether the field parameters meet the requirements, and the format processing rule is used for converting the corresponding parameters into a set format.
It should be noted that, since the fields and requirements included in different types of contracts may be different, in the embodiment of the present application, corresponding checking rules and format processing rules are set for different contract types and are stored in the contract field configuration table.
Alternatively, since different fields have different types and requirements, corresponding conditions, such as minimum value, maximum value, field type, etc., may be set according to different fields. For example, as shown in table 4.
TABLE 4
S402, checking the corresponding field data in the same data set by using each checking rule.
Specifically, each verification rule is used for verifying the corresponding field data, and when all the field data are successfully verified, the next step can be executed. If the verification fails, prompt information can be fed back to the user.
It should be noted that the fields corresponding to the rule may be all fields or some types of fields, for example, all fields are non-null checked according to the rule; if the field is a string, the length must be greater than the minimum length and less than the maximum length; if the field is a number, checking whether the number is a specified length, and if the minimum value and the maximum value are set, performing interval checking; if the field is the amount, checking whether the amount is in a designated interval; if the field is a date, checking whether the date is in the specified format; if the field is regular, the data is checked using a specified regular expression, and so on.
And S403, performing format processing on the data of the corresponding type in the contract data set by using each format processing rule.
In order to make the format of the data uniform and meet the requirement of a good adaptation protocol template, a preset format processing rule needs to be used for processing the format of the data of a corresponding type. For example: and formatting the date to be in accordance with the format required by the service system. Such as year/month/day, month/day/year, year-month-day, etc. And (4) money formatting, namely setting decimal precision of display, and performing Chinese conversion processing on money, such as XXX integration and the like. The account number is desensitized, and several digits in the account number can be displayed as an asterisk according to rules. Desensitizing the phone number, several digits in the phone number can be displayed as asterisks according to rules. The word processing is mainly to perform line feed processing on words needing multi-line display such as addresses, and the like, and can specify how many characters are displayed on each line in a rule.
Optionally, to facilitate subsequent queries for contract-related data, and to support multiplexing of data. Therefore, optionally, in another embodiment of the present application, after step S105 is executed, the data in the contract generation request message may be further stored. As shown in fig. 5, the method for storing data in a contract generation request message provided in the embodiment of the present application includes:
and S501, storing the contract basic information as a record in a contract detail table.
And S502, storing the protocol information as a record in a protocol detail table.
Since the contract basic information corresponds to one contract and the agreement information corresponds to one agreement, both the contract basic information and the agreement information are stored as one record.
And S503, regarding each field in the contract data set, storing the field name of the field, the value corresponding to the field and the contract number as a record in a contract detail table.
In the conventional method, the contract data is maintained by maintaining a contract table for each type of contract. However, in this way, when the types of contracts increase, the workload of developers is greatly increased, and when the fields of the contracts change, the fields corresponding to the library table also need to be modified correspondingly, so that the maintenance is relatively complicated, and errors are easily caused.
Therefore, in the embodiment of the present application, the contract data of each contract is divided into a plurality of fields, and is uniformly stored in one data table. However, in order to distinguish data of different contracts, it is necessary to associate the contract numbers. For example, as shown in table 5.
TABLE 5
And S106, finding out a target protocol template matched with the protocol key information in the protocol information.
It should be noted that, according to the protocol to be signed, the corresponding protocol template is preset, so that the corresponding target protocol template can be searched according to the protocol key information in the protocol information, and then step S107 is executed.
And S107, combining the target agreement template and the contract data set to obtain a contract document.
Specifically, the data in the contract data set is filled into the target agreement template to obtain the contract document.
Optionally, in another embodiment of the present application, a specific implementation manner of step S107 includes:
and filling values in the key value pairs to positions of variable names of the key value pairs in the target protocol template aiming at each group of key value pairs in the contract data set, and setting fonts and watermarks corresponding to the target protocol template to obtain a contract file.
Specifically, the protocol key information may be analyzed first, and specifically, the protocol key information may include a protocol type number, a protocol version number, and the like. And then matching defined protocol template information from the protocol template configuration table, wherein the protocol template information comprises files, template names, template states, watermark numbers, font files and the like of the target protocol template. The protocol template configuration table may be specifically as shown in table 6.
TABLE 6
And then acquiring a matched watermark file from a watermark configuration table according to the watermark number. Finally, the value in the key value pair can be filled to the position of the variable name of the key value pair in the target protocol template, and a corresponding font file and a watermark file are set, so that the finally generated contract is generated according to the font of the font file, and the watermark corresponding to the watermark file is attached to the contract. For example, as shown in table 7, the values of the right key-value pairs are filled in the left agreement template at positions corresponding to the field names thereof, and the font file and the watermark file are set, and finally the contract shown in the last line of the table is generated.
TABLE 7
According to the contract generation method provided by the embodiment of the application, a request message is generated by receiving a contract; the contract generation request message includes contract basic information, agreement information and contract data. And then detecting whether the contract basic information is effective or not based on the contract number in the contract basic information. If the contract basic information is detected to be effective, whether the contract information is correct or not is detected based on the contract key information in the contract information, and therefore the relevant information is ensured to be effective and available. Therefore, when the agreement information is detected to be effective, the contract data is analyzed into a plurality of groups of key value pairs to obtain a contract data set. And the data in the contract data set is verified and formatted by using a preset rule so as to ensure that the contract data meets the requirements and can be adapted to the protocol template. And finally, searching a target protocol template matched with the protocol key information in the protocol information, and combining the target protocol template and the contract data set to obtain a contract file. Therefore, the generation method applicable to all types of contracts is realized, so that not only is a plurality of interfaces not required to be arranged, but also multiplexing can be carried out, the workload during subsequent management and change is greatly reduced, and the convenience of management and change is improved.
Another embodiment of the present application provides a contract generating apparatus, as shown in fig. 6, including:
the receiving unit 601 is configured to receive a contract generation request message.
The contract generation request message includes contract basic information, agreement information and contract data.
A contract information verifying unit 602, configured to detect whether the contract base information is valid based on the contract number in the contract base information.
The agreement information checking unit 603 is configured to, if it is detected that the contract basic information is valid, detect whether the agreement information is error-free based on the agreement key information in the agreement information.
And a contract data analysis unit 604, configured to, if the agreement information is detected to be valid, analyze the contract data into a plurality of key value pairs to obtain a contract data set.
A contract data processing unit 605, configured to perform verification and format processing on the data in the contract data set by using a preset rule.
The template searching unit 606 is configured to search for a target protocol template matching the protocol key information in the protocol information.
The merging unit 607 is configured to merge the target agreement template and the contract data set to obtain a contract document.
Optionally, in an apparatus for generating a contract provided in another embodiment of the present application, the contract information verifying unit includes:
and the identification unit is used for identifying the contract basic information in the contract generation request message.
And the first analysis unit is used for analyzing the key contract information from the contract basic information.
Wherein the key contract information at least comprises a contract number.
And the parameter record searching unit is used for searching the target parameter record corresponding to the contract number from the contract type parameter table.
And the state detection unit is used for detecting whether the contract state in the target parameter record is valid or not.
And if the contract state in the target parameter record is valid, determining that the contract basic information is valid.
Optionally, in an apparatus for generating a contract provided in another embodiment of the present application, the agreement information checking unit includes:
and the second analysis unit is used for analyzing the protocol key information from the protocol information. The protocol key information at least comprises a protocol type number and a version number.
And the matching unit is used for matching target configuration information corresponding to the protocol key information from the protocol template configuration table.
And the detection unit is used for detecting whether the protocol information is correct or not based on the target configuration information.
Optionally, in the apparatus for generating a contract provided in another embodiment of the present application, the preset rule includes a plurality of verification rules and a plurality of format processing rules. The contract data processing unit in the embodiment of the application comprises:
and the rule searching unit is used for searching out corresponding check rules and format processing rules from the contract field configuration table according to the contract type in the contract basic information.
And the contract data checking unit is used for checking the corresponding field data in the contract data set by using each checking rule.
And the format processing unit is used for performing format processing on the data of the corresponding type in the contract data set by using each format processing rule.
Optionally, in an apparatus for generating a contract provided in another embodiment of the present application, the apparatus further includes:
and the first storage unit is used for storing the contract basic information as a record in the contract detail table.
And the second storage unit is used for storing the protocol information as a record into the protocol detail table.
And the third storage unit is used for respectively storing the field name of the field, the value corresponding to the field and the contract number as one record in the contract detail table for each field in the contract data set.
Optionally, in an apparatus for generating a contract provided in another embodiment of the present application, the merging unit includes:
and the merging subunit is used for filling the values in the key value pairs to the positions of the variable names of the key value pairs in the target protocol template aiming at each group of key value pairs in the contract data set, and setting the fonts and the watermarks corresponding to the target protocol template to obtain the contract file.
It should be noted that, for the specific working processes of each unit provided in the foregoing embodiments of the present application, corresponding steps in the foregoing method embodiments may be referred to accordingly, and are not described herein again.
Another embodiment of the present application provides an electronic device, as shown in fig. 7, including:
a memory 701 and a processor 702.
The memory 701 is used for storing programs.
The processor 702 is configured to execute a program stored in the memory 701, which when executed is specifically configured to implement the contract generation method provided by any of the above-described method embodiments.
Another embodiment of the present application provides a computer storage medium for storing a computer program, which when executed, is used to implement the contract generating method provided by any one of the above method embodiments.
Computer storage media, including permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A method of generating a contract, comprising:
receiving a contract generation request message; the contract generation request message comprises contract basic information, protocol information and contract data;
detecting whether the contract basic information is valid or not based on the contract number in the contract basic information;
if the contract basic information is detected to be effective, detecting whether the contract information is correct or not based on the key information of the contract in the contract information;
if the agreement information is detected to be effective, analyzing the contract data into a plurality of groups of key value pairs to obtain a contract data set;
verifying and processing the format of the data in the same data set by using a preset rule;
finding out a target protocol template matched with the protocol key information in the protocol information;
and merging the target agreement template and the contract data set to obtain a contract file.
2. The method of claim 1, wherein the detecting whether the contract base information is valid based on the contract number in the contract base information comprises:
identifying the contract basic information in the contract generation request message;
analyzing key contract information from the contract basic information; wherein the key contract information at least comprises a contract number;
searching a target parameter record corresponding to the contract number from a contract type parameter table;
detecting whether the contract state in the target parameter record is effective or not; and if the contract state in the target parameter record is valid, determining that the contract basic information is valid.
3. The method of claim 1, wherein the detecting whether the protocol information is error-free based on protocol critical information in the protocol information comprises:
analyzing the protocol key information from the protocol information; the protocol key information at least comprises a protocol type number and a version number;
matching target configuration information corresponding to the protocol key information from a protocol template configuration table;
and detecting whether the protocol information is error-free or not based on the target configuration information.
4. The method of claim 1, wherein the preset rules include a plurality of checking rules and a plurality of format processing rules, and the checking and format processing of the data in the same data set by using the preset rules includes:
according to the contract type in the contract basic information, searching out each corresponding check rule and format processing rule from a contract field configuration table;
verifying corresponding field data in the contract data set by using the verification rules respectively;
and carrying out format processing on the data of the corresponding type in the contract data set by using each format processing rule.
5. The method of claim 1, wherein after the checking and formatting the data in the same data set by using the preset rule, the method further comprises:
storing the contract basic information as a record in a contract detail table;
storing the protocol information as a record in a protocol detail table;
and respectively storing the field name of each field, the value corresponding to the field and the contract number as a record in a contract detail table for each field in the contract data set.
6. The method of claim 1, wherein merging the target agreement template with the contract data set to obtain a contract document comprises:
and for each group of key value pairs in the contract data set, filling values in the key value pairs to the positions of variable names of the key value pairs in the target protocol template, and setting fonts and watermarks corresponding to the target protocol template to obtain a contract file.
7. An apparatus for generating a contract, comprising:
a receiving unit, configured to receive a contract generation request message; the contract generation request message comprises contract basic information, protocol information and contract data;
a contract information checking unit, configured to detect whether the contract basic information is valid based on a contract number in the contract basic information;
the agreement information checking unit is used for detecting whether the agreement information is correct or not based on the agreement key information in the agreement information if the contract basic information is detected to be valid;
the contract data analysis unit is used for analyzing the contract data into a plurality of groups of key value pairs to obtain a contract data set if the protocol information is detected to be valid;
the contract data processing unit is used for verifying and processing the format of the data in the contract data set by using a preset rule;
the template searching unit is used for searching a target protocol template matched with the protocol key information in the protocol information;
and the merging unit is used for merging the target protocol template and the contract data set to obtain a contract file.
8. The apparatus of claim 7, wherein the contract information verifying unit comprises:
an identification unit, configured to identify the contract basic information in the contract generation request message;
the first analysis unit is used for analyzing key contract information from the contract basic information; wherein the key contract information at least comprises a contract number;
the parameter record searching unit is used for searching a target parameter record corresponding to the contract number from a contract type parameter table;
the state detection unit is used for detecting whether the contract state in the target parameter record is valid or not; and if the contract state in the target parameter record is valid, determining that the contract basic information is valid.
9. An electronic device, comprising:
a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to execute the program, which when executed is specifically configured to implement the method of generating a contract according to any one of claims 1 to 6.
10. A computer storage medium storing a computer program which, when executed, implements the contract generation method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210308599.XA CN114493551B (en) | 2022-03-28 | 2022-03-28 | Contract generation method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210308599.XA CN114493551B (en) | 2022-03-28 | 2022-03-28 | Contract generation method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114493551A true CN114493551A (en) | 2022-05-13 |
CN114493551B CN114493551B (en) | 2022-07-05 |
Family
ID=81487268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210308599.XA Active CN114493551B (en) | 2022-03-28 | 2022-03-28 | Contract generation method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114493551B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116151774A (en) * | 2023-04-18 | 2023-05-23 | 北京江融信科技有限公司 | Visual management method and system for automatically generating protocol template and electronic equipment |
CN118428910A (en) * | 2024-07-05 | 2024-08-02 | 梅州客商银行股份有限公司 | Method and device for managing project expense in full period and electronic equipment |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060287966A1 (en) * | 2004-12-21 | 2006-12-21 | Oracle International Corporation | Methods and systems for authoring customized contracts using contract templates that include user-configured rules and questions |
WO2018149082A1 (en) * | 2017-02-17 | 2018-08-23 | 平安科技(深圳)有限公司 | Contract generation method and apparatus, server and storage medium |
CN109325729A (en) * | 2018-08-21 | 2019-02-12 | 平安科技(深圳)有限公司 | A kind of method and server generating electronic contract |
CN109636681A (en) * | 2018-10-16 | 2019-04-16 | 深圳壹账通智能科技有限公司 | Contract generation method, device, equipment and storage medium |
CN109815471A (en) * | 2019-01-04 | 2019-05-28 | 深圳壹账通智能科技有限公司 | Contract text generation method, device, computer equipment and storage medium |
CN110738038A (en) * | 2019-10-23 | 2020-01-31 | 泰康保险集团股份有限公司 | Contract text generation method, device, equipment and computer readable storage medium |
CN110765770A (en) * | 2019-09-04 | 2020-02-07 | 平安科技(深圳)有限公司 | Automatic contract generation method and device |
CN111429085A (en) * | 2020-03-02 | 2020-07-17 | 中国平安人寿保险股份有限公司 | Contract data generation method and device, electronic equipment and storage medium |
CN113627145A (en) * | 2021-08-02 | 2021-11-09 | 上海浦东发展银行股份有限公司 | Method, device, equipment and medium for generating file of parameterized configuration |
CN114239518A (en) * | 2021-11-15 | 2022-03-25 | 广东盈峰普惠互联小额贷款股份有限公司 | System and method for online generation of electronic contract template |
-
2022
- 2022-03-28 CN CN202210308599.XA patent/CN114493551B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060287966A1 (en) * | 2004-12-21 | 2006-12-21 | Oracle International Corporation | Methods and systems for authoring customized contracts using contract templates that include user-configured rules and questions |
WO2018149082A1 (en) * | 2017-02-17 | 2018-08-23 | 平安科技(深圳)有限公司 | Contract generation method and apparatus, server and storage medium |
CN109325729A (en) * | 2018-08-21 | 2019-02-12 | 平安科技(深圳)有限公司 | A kind of method and server generating electronic contract |
CN109636681A (en) * | 2018-10-16 | 2019-04-16 | 深圳壹账通智能科技有限公司 | Contract generation method, device, equipment and storage medium |
CN109815471A (en) * | 2019-01-04 | 2019-05-28 | 深圳壹账通智能科技有限公司 | Contract text generation method, device, computer equipment and storage medium |
CN110765770A (en) * | 2019-09-04 | 2020-02-07 | 平安科技(深圳)有限公司 | Automatic contract generation method and device |
CN110738038A (en) * | 2019-10-23 | 2020-01-31 | 泰康保险集团股份有限公司 | Contract text generation method, device, equipment and computer readable storage medium |
CN111429085A (en) * | 2020-03-02 | 2020-07-17 | 中国平安人寿保险股份有限公司 | Contract data generation method and device, electronic equipment and storage medium |
CN113627145A (en) * | 2021-08-02 | 2021-11-09 | 上海浦东发展银行股份有限公司 | Method, device, equipment and medium for generating file of parameterized configuration |
CN114239518A (en) * | 2021-11-15 | 2022-03-25 | 广东盈峰普惠互联小额贷款股份有限公司 | System and method for online generation of electronic contract template |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116151774A (en) * | 2023-04-18 | 2023-05-23 | 北京江融信科技有限公司 | Visual management method and system for automatically generating protocol template and electronic equipment |
CN118428910A (en) * | 2024-07-05 | 2024-08-02 | 梅州客商银行股份有限公司 | Method and device for managing project expense in full period and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114493551B (en) | 2022-07-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114493551B (en) | Contract generation method and device, electronic equipment and storage medium | |
US10013439B2 (en) | Automatic generation of instantiation rules to determine quality of data migration | |
CN107092535B (en) | Method and apparatus for data storage of test interface | |
CN112732641A (en) | Electronic file filing method, device and medium | |
CN110032568B (en) | Data structure reading and updating method and device, and electronic equipment | |
US8484724B2 (en) | User permissions in computing systems | |
CN114385722A (en) | Interface attribute consistency checking method and device, electronic equipment and storage medium | |
CN113935289A (en) | Document online processing method and device | |
CN117708857A (en) | Method and device for detecting electronic file, electronic equipment and medium | |
CN112925523A (en) | Object comparison method, device, equipment and computer readable medium | |
CN116932399A (en) | Message generation method and device and nonvolatile storage medium | |
CN109542890B (en) | Data modification method, device, computer equipment and storage medium | |
CN112712421B (en) | Method, equipment and storage medium for automatically downloading running bill | |
CN115220731A (en) | Index data acquisition method and device, computer equipment and storage medium | |
CN112069519A (en) | Method and equipment for outputting encrypted record of information file | |
CN110517010A (en) | A kind of data processing method, system and storage medium | |
US11768819B2 (en) | Data unblocking in application platforms | |
CN114528516B (en) | Intelligent informatization project management method and device | |
CN115982780A (en) | File detection method and device, electronic equipment and storage medium | |
CN117114637A (en) | Method and device for generating prompt mail | |
CN112363981A (en) | Automatic error correction method and system for LDIF file | |
CN117149755A (en) | Method, system, equipment and storage medium for detecting data quality | |
CN114489634A (en) | API (application program interface) class generation method and device, electronic equipment and readable storage medium | |
CN116755922A (en) | Error code information management method and related equipment | |
CN116893966A (en) | Test case processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |