Contract processing method and device
By extracting key information in commercial factoring contract processing and calling preset processing models to calculate the processing results, the problems of inefficiency and low accuracy in the existing technology are solved, efficient and accurate contract processing is achieved, and human risks are reduced.
Patent Information
- Application Number
- CN202411964238.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The prior art is inefficient in the handling of commercial factoring contracts and is susceptible to human factors, making it difficult to adapt to the changes and diversity of contract texts, resulting in low accuracy and high human risks.
By receiving a contract processing request, obtaining contract risk preference indicators, extracting key information in the contract file, calling the trained preset processing model to calculate the processing results, and generating a processing report, and then updating the statistical data based on the modified information to adjust the processing model.
It improves the efficiency and accuracy of commercial factoring contract processing, reduces artificial risks, and enhances the adaptability and user experience of the system.
Smart Images

Figure CN119886054A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a contract processing method and device. Background Art
[0002] With the rapid development of globalization and information technology, the accuracy and efficiency of commercial factoring contract processing have a vital impact on the quality and risk management of financial services. The traditional manual processing method is inefficient and easily affected by human factors, and can no longer meet the rapid development needs of modern commercial factoring business. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a contract processing method and device, which can at least realize intelligent processing of commercial factoring contracts, improve processing efficiency, and reduce human risks.
[0004] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a contract processing method is provided, including: receiving a contract processing request, obtaining a corresponding contract risk preference indicator, and determining a time point for starting the contract processing process; in response to reaching the time point for starting the contract processing process, obtaining the contract text, extracting key information in the contract document, and generating feedback data; calling a trained preset processing model, and calculating the processing result according to the feedback data; based on the feedback data, marking the contract document, and generating a processing report in combination with the processing result; in response to the modification information marked in the processing report, updating the preset statistical data corresponding to each marking, and adjusting the processing model through the statistical data.
[0005] Optionally, obtain the corresponding contract risk preference indicator and determine the time point for starting the contract processing flow, including: obtaining the corresponding contract risk preference indicator, locating the contract risk preference level according to the contract risk preference level, and matching the time point for starting the contract processing flow.
[0006] Optionally, before extracting key information from a contract document, the process includes: identifying the type of the contract document, calling a preset text type configuration file, and determining whether the type is type information in the text type configuration file; if so, extracting key information from the contract text; if not, calling a corresponding conversion model according to the text type configuration file, converting the contract document, and extracting key information from the converted contract document.
[0007] Optionally, extracting key information from the contract document includes: calling a recognition engine, performing text recognition on the contract text, generating editable text, and extracting key information from the editable text.
[0008] Optionally, extracting key information from the contract document includes: splitting the contract text into independent vocabulary units through a word segmentation tool, calling a preset entity recognition model to process the vocabulary units, determining key entities and corresponding entity types; and using the key entities and corresponding entity types as key information.
[0009] Optionally, after determining the key entity and the corresponding entity type, the method includes: locating the arrangement position of the key entity in the contract text; and updating the entity type corresponding to the key entity according to the mapping relationship between the arrangement position and the entity type.
[0010] Optionally, after determining the key entity and the corresponding entity type, it includes: extracting a preset number of participles from the key entity, and using the extracted participles together with the key entity as participles to be matched; calling a preset dictionary, querying the participles to be matched, obtaining the dictionary value corresponding to the hit participle, and updating the dictionary value to the entity type corresponding to the key entity.
[0011] Optionally, updating the dictionary value to the entity type corresponding to the key entity includes: obtaining the weight of each hit participle, and updating the dictionary value corresponding to the hit participle with the highest weight to the entity type corresponding to the key entity.
[0012] Optionally, before calling the trained preset processing model to calculate and obtain feedback data, it includes: collecting and preprocessing contract approval records according to a preset ratio of passed and failed processing; initializing parameters of the preset processing model using random values on a Gaussian distribution, and training the initialized processing model based on the preprocessed contract approval records; calculating the loss result of each contract approval record based on a preset loss function, averaging all loss results, and terminating the training when the loss result after averaging is less than a preset loss value or the number of training times exceeds a preset threshold number of times, thereby obtaining a trained processing model.
[0013] Optionally, training the initialized processing model according to the preprocessed contract approval records includes: updating parameters of the processing model by a gradient descent method.
[0014] Optionally, after the processing report is generated, the method includes: in response to the selected output format, converting the processing report into the output format.
[0015] Optionally, after the processing report is generated, the following steps are included: calling a modification engine, identifying the annotation type, matching the modification model, and obtaining reverse display information by executing the modification model; locating the position of the key entity corresponding to the annotation, and presenting the reverse display information.
[0016] Optionally, it also includes: monitoring the amount of updated data in the contract processing database; in response to the amount of updated data reaching a preset quantity threshold, starting a processing model training program to obtain updated data for processing model training.
[0017] Optionally, the processing result is calculated based on the feedback data, including: calculating a processing value based on the feedback data, calling a preset interval rating model, querying the interval rating corresponding to the processing value, and using the processing value and the interval rating as the processing result.
[0018] To achieve the above object, according to another aspect of an embodiment of the present invention, a contract processing device is provided, comprising: a starting module, configured to receive a contract processing request, obtain a corresponding contract risk preference indicator, and determine a time point for starting a contract processing process;
[0019] A feedback data generation module, for obtaining the contract text, extracting key information from the contract document, and generating feedback data in response to reaching a time point for starting the contract processing flow;
[0020] The processing result generation module is used to call the trained preset processing model and calculate the processing result according to the feedback data;
[0021] A processing report generation module is used to mark the contract documents based on the feedback data and generate a processing report based on the processing results;
[0022] The adjustment module is used to update the preset statistical data corresponding to each annotation in response to the modification information annotated in the processing report, and adjust the processing model through the statistical data.
[0023] Optionally, the starting module obtains a corresponding contract risk preference indicator and determines a time point for starting the contract processing flow, including:
[0024] Obtain the corresponding contract risk preference indicator, locate the contract risk preference level according to the contract risk preference level, and match the time point for starting the contract processing process.
[0025] Optionally, before the feedback data generation module extracts the key information from the contract document, it includes: identifying the type of the contract document, calling a preset text type configuration file, and determining whether the type is the type information in the text type configuration file; if so, extracting the key information in the contract text; if not, calling a corresponding conversion model according to the text type configuration file, converting the contract document, and extracting the key information in the converted contract document.
[0026] Optionally, the feedback data generation module extracts key information from the contract document, including: calling a recognition engine, performing text recognition on the contract text, generating an editable text, and extracting key information from the editable text.
[0027] Optionally, the feedback data generation module extracts key information from the contract document, including: splitting the contract text into independent vocabulary units through a word segmentation tool, calling a preset entity recognition model to process the vocabulary units, determining key entities and corresponding entity types; and using the key entities and corresponding entity types as key information.
[0028] Optionally, after the feedback data generation module determines the key entity and the corresponding entity type, it includes: locating the arrangement position of the key entity in the contract text; and updating the entity type corresponding to the key entity according to the mapping relationship between the arrangement position and the entity type.
[0029] Optionally, after the feedback data generation module determines the key entity and the corresponding entity type, it includes: extracting a preset number of participles from the key entity, and using the extracted participles together with the key entity as participles to be matched; calling a preset dictionary, querying the participles to be matched, obtaining the dictionary value corresponding to the hit participle, and updating the dictionary value to the entity type corresponding to the key entity.
[0030] Optionally, the feedback data generation module updates the dictionary value to the entity type corresponding to the key entity, including: obtaining the weight of each hit word, and updating the dictionary value corresponding to the hit word with the highest weight to the entity type corresponding to the key entity.
[0031] Optionally, before the processing result generation module calls the trained preset processing model to calculate and obtain feedback data, it includes: collecting and preprocessing contract approval records according to a preset ratio of passed and failed processing; initializing parameters of the preset processing model using random values on a Gaussian distribution, and training the initialized processing model based on the preprocessed contract approval records; calculating the loss result of each contract approval record based on a preset loss function, averaging all loss results, and terminating the training when the loss result after averaging is less than a preset loss value or the number of training times exceeds a preset threshold number of times to obtain a trained processing model.
[0032] Optionally, the processing result generation module trains the initialized processing model according to the pre-processed contract approval record, including: updating the parameters of the processing model by gradient descent method.
[0033] Optionally, after the processing report generation module generates the processing report, the module further comprises: in response to the selected output format, converting the processing report into the output format.
[0034] Optionally, after the processing report generation module generates the processing report, it includes: calling the modification engine, identifying the annotation type, matching the modification model, and obtaining the reverse display information by executing the modification model; locating the position of the key entity corresponding to the annotation, and presenting the reverse display information.
[0035] Optionally, the processing result generation module is further used to: monitor the amount of updated data in the contract processing database; in response to the amount of updated data reaching a preset quantity threshold, start a processing model training program to obtain updated data for processing model training.
[0036] Optionally, the processing result generation module calculates the processing result based on the feedback data, including: calculating the processing value based on the feedback data, calling a preset interval rating model, querying the interval rating corresponding to the processing value, and using the processing value and the interval rating as the processing result.
[0037] To achieve the above objective, according to another aspect of an embodiment of the present invention, a contract processing electronic device is provided.
[0038] The electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned contract processing methods.
[0039] To achieve the above-mentioned purpose, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the above-mentioned contract processing methods is implemented.
[0040] To achieve the above object, according to another aspect of an embodiment of the present invention, a computer program product is provided. A computer program product of an embodiment of the present invention includes a computer program, and when the program is executed by a processor, the contract processing method provided by the embodiment of the present invention is implemented.
[0041] According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: it can solve the technical problem that the existing rule-based or template matching system is difficult to adapt to the changes and diversity of the contract text, that is, the poor adaptability; for complex contract texts, the rule-based or template matching system is prone to false positives or false negatives, that is, the low accuracy; it requires a lot of manual pre-processing and post-processing work, such as contract scanning, text alignment, etc., resulting in the technical problem of limited overall processing efficiency. Therefore, the present invention has shown significant advantages in the field of commercial factoring contract processing, which not only improves processing efficiency and accuracy, but also reduces human risks and improves user experience.
[0042] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0044] Figure 1 This is a schematic diagram of the main process of a contract processing method according to an embodiment of the present invention;
[0045] Figure 2 is a schematic diagram of a left and right structure of optional key information according to an embodiment of the present invention;
[0046] Figure 3 is a schematic diagram of an optional upper and lower structure of key information according to an embodiment of the present invention;
[0047] Figure 4 is a schematic diagram of a training process of a processing model according to an embodiment of the present invention;
[0048] Figure 5 is a schematic diagram of an optional contract document annotation according to an embodiment of the present invention;
[0049] Figure 6 is a schematic diagram of an optional automatic modification of key information according to an embodiment of the present invention;
[0050] Figure 7 is a main flow chart of another contract processing method according to an embodiment of the present invention;
[0051] Figure 8 is a schematic diagram of main modules of a contract processing device according to an embodiment of the present invention;
[0052] Fig. 9 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0053] Fig.10 It is a schematic diagram of the structure of a computer system of a mobile device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0055] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0056] In the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The acquisition, transmission, storage, use, and processing of data in the technical solution of the present invention are in compliance with the relevant provisions of national laws and regulations, and are used for legal and reasonable purposes, and are not shared, disclosed, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities.
[0057] For user information, necessary measures should be taken to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once such user personal information data is no longer needed, risks should be minimized by limiting or even prohibiting data collection and / or deleting data. When applicable, including in certain relevant applications, protect user privacy by de-identifying data, such as by removing specific identifiers (e.g., date of birth, etc.), controlling the amount or specificity of stored data (e.g., collecting location data at the city level rather than at the specific address level), controlling how data is stored, and / or other methods of de-identification.
[0058] See also Figure 1 , which shows a main flow chart of a contract processing method provided by an embodiment of the present invention, including the following steps:
[0059] S101: Receive a contract processing request, obtain the corresponding contract risk preference indicator, and determine the time point to start the contract processing process.
[0060] S102: In response to reaching the time point of starting the contract processing flow, the contract text is obtained, key information in the contract document is extracted, and feedback data is generated.
[0061] S103: Call the trained preset processing model and calculate the processing result according to the feedback data.
[0062] S104: Based on the feedback data, mark it in the contract document and generate a processing report based on the processing results.
[0063] S105: In response to the modification information marked in the processing report, the preset statistical data corresponding to each mark is updated, and the processing model is adjusted according to the statistical data.
[0064] In the above implementation mode, the present invention utilizes artificial intelligence technology to adaptively initiate the contract processing flow at different time points according to different contract risk preferences, generates feedback data based on key information in the contract text and calls the processing model to calculate the processing results, and forms a processing report with the feedback data and processing results marked in the contract document. At the same time, the statistical data can be updated in response to modified information to adjust the processing model.
[0065] In a further embodiment, for step S101, the corresponding contract risk preference index is obtained, and the time point for starting the contract processing flow is determined, so that the present application can select different contract processing flow execution time points according to the risk preference situation, and achieve the technical effect of using system-assisted approval or automatic approval to make compliance judgment results. In a further embodiment, the corresponding contract risk preference index can be obtained, and the contract risk preference level can be located according to the contract risk preference level, and the time point for starting the contract processing flow can be matched.
[0066] For example: if the contract risk preference level is positioned as level one according to the contract risk preference level, it is mainly applicable to the case of conservative risk preference (that is, the contract processing flow of the present invention is used as an auxiliary approval function). Before the existing contract processing flow is initiated or during the approval process, the contract processing flow of the present invention is started, and then the compliance judgment result can be verified. According to the verification result, an additional approval process can be selected (for example, the contract processing flow of the present invention is predicted to be wrong). Of course, the contract processing flow can also be directly terminated (for example, the contract processing flow of the present invention is predicted to be correct). Another example: if the contract risk preference level is positioned as level three according to the contract risk preference level, it is mainly applicable to the case of aggressive risk preference (that is, the contract processing flow of the present invention is used as the system automatic approval function). It can directly replace the existing approval flow of the system, start the contract processing flow of the present invention to obtain the predicted result, and automatically approve it. It should be noted that in order to prevent malicious exploitation of vulnerabilities, a preset proportion of business spot checks can be configured. If there is any doubt about the automatic approval result during the spot check, it can be transferred to the existing approval flow of the system for re-discussion. Of course, the results of the existing approval are also collected to update the processing model of the present invention.
[0067] In a further embodiment, for step S102, before extracting the key information in the contract document, it includes: identifying the type of the contract document, calling a preset text type configuration file, and judging whether the type is the type information in the text type configuration file. According to the judgment result, if yes, the key information in the contract text is extracted; otherwise, the corresponding conversion model is called according to the text type configuration file to convert the contract document and extract the key information in the converted contract document. For example: identifying the type of the contract document as an electronic contract document, calling the text type configuration file, and if the type information exists, the string text can be directly extracted. Another example: identifying the type of the contract document as a scanned contract document, calling the text type configuration file, and if the type information does not exist, the scanned contract document is converted into a standard electronic document through the corresponding conversion model, for example, the image is subjected to denoising, binarization, rotation correction and other processing operations.
[0068] In some other embodiments, for extracting key information from the contract document in step S102, it may include invoking an identification engine to perform character recognition on the contract text to generate editable text, and then extracting the key information from the editable text. For example: Invoke a high-precision OCR (Optical Character Recognition, which refers to the process of analyzing and recognizing an image file of text materials to obtain text and version information) engine, such as Tesseract, to perform character recognition on the image and convert the recognized text into an editable TXT format. It should be noted that quality checks can be performed on the OCR recognition results to identify and correct possible errors, and irrelevant information such as headers, footers, and watermarks in the text can be removed before extracting the key information from the contract document, that is, text cleaning is achieved. Thus, through this embodiment, a paper contract can be accurately converted into editable text, avoiding errors in the manual input process.
[0069] In some other embodiments, for extracting key information from the contract document in step S102, it may include: splitting the contract text into independent lexical units through a word segmentation tool, invoking a preset entity recognition model to process the lexical units, determining the key entities and their corresponding entity types, and then taking the key entities and their corresponding entity types as key information. For example: Use a word segmentation tool (such as jieba segmentation, HanLP segmentation, Jcseg segmentation, etc.) to split the contract text into independent lexical units, such as "name", "$1000", etc. Apply an entity recognition model (such as a deep learning-based BiLSTM-CRF model, convolutional neural network CNN, recurrent neural network RNN, etc.) to identify the key entities in the contract, such as: entity types being "name", "ID number", "amount", "term", "interest rate".
[0070] It should be noted that: after splitting the contract text into independent lexical units through a word segmentation tool, stop words and punctuation marks can be removed. For example: By invoking a stop word list or by invoking a regular expression, common stop words (such as "of", "is", etc.) and punctuation marks in the text can be removed.
[0071] In a preferred embodiment, considering that an entity may be the Party A in Contract A and the Party B in Contract B, after determining the key entities and their corresponding entity types, more accurate entity classification can be achieved through the arrangement of the key entities in the contract text or through reclassification.
[0072] For example: Locate the arrangement position of the key entity in the contract text, and update the entity type corresponding to the key entity according to the mapping relationship between the arrangement position and the entity type. For example: In the contract text, information about Party A and Party B is usually presented in blocks, with a left-right structure (such as Figure 2 ), group them according to the structural characteristics. If the same defined words appear continuously, group them every other data, and then determine whether the characters "Party A" and "Party B" appear in the data, complete the positioning, and update the entity type. For example, "ID number" is updated to "Party A ID number"; there are also upper and lower structures (such as Figure 3 ), if the same definition word appears multiple times with the same interval, the data will be divided into the same group according to the continuous appearance until the next identical character is encountered, and then the grouping will be ended. Then it will be determined whether the characters "Party A" and "Party B" appear in the data, and the positioning will be completed. The entity type will be updated, for example, "ID number" will be updated to "Party A ID number".
[0073] As another example, more accurate entity classification can be achieved through reclassification: extract a preset number of participles from the key entity forward, use the extracted participles together with the key entity as the participles to be matched, then call the preset dictionary, query the participles to be matched, obtain the dictionary value corresponding to the hit participle, and update the dictionary value to the entity type corresponding to the key entity. Preferably, the weight of each hit participle is obtained, and the dictionary value corresponding to the hit participle with the highest weight is updated to the entity type corresponding to the key entity. For example: reclassify the identified data such as the name and certificate number, extract 5 participles forward from the key entity position, use the extracted 5 participles together with the key entity as the participles to be matched, call the preset dictionary for tail matching, and use the weight method (such as the hit priority in Table 1). The field with the higher weight has the priority to be hit.
[0074] Table 1
[0075]
[0076] It can be seen that the present invention can deeply understand the contract content and accurately extract key information through the above-mentioned embodiments, providing the most accurate data preparation for subsequent intelligent compliance predictions and reducing false positives and negative negatives.
[0077] In a further embodiment, for step S103, before calling the trained preset processing model to calculate and obtain feedback data, the preset processing model may be trained, such as Figure 4 As shown, including:
[0078] S401: Collect and pre-process the contract approval records according to the preset ratio of passed and failed processing. For example, select the following 30,000 samples as the sample set, as shown in Table 2:
[0079] Table 2
[0080] Approved Approval failed Last year's approval records 8000 8000 Approval records for the past two years 5000 5000 Approval records for the past three years 2000 2000
[0081] Among them, 2000 samples that passed the training were randomly selected, and 2000 samples that failed were used as the test data set (not participating in model training, only as final accuracy verification), and the remaining 26000 data were used as the training set.
[0082] It should be noted that in order to have better processing model training accuracy and speed, the collected sample data can be pre-processed, such as unit conversion, normalization, etc.: Contract amount: converted into the corresponding value based on the unit of RMB 10,000, Contract term: converted into the corresponding value based on the unit of days, Contract interest rate: converted into the corresponding value based on the unit BP number (0.01% or 0.00001).
[0083] S402: Initialize the parameters of the preset processing model using random values on the Gaussian distribution, and train the initialized processing model based on the pre-processed contract approval records. Example: Processing model:
[0084]
[0085] Where x is the key entity corresponding to the entity type in the feedback data, for example, x0 can be the contract amount, x1 can be the contract term, and x2 can be the contract interest rate. θ0, θ1, and θ2 are parameters trained by machine learning. For example: use random values on the Gaussian distribution N(0,1) to initialize the parameters θ0, θ1, and θ2. Preferably, the parameters of the processing model are updated by the gradient descent method. For example: during the training process, the parameters θ0, θ1, and θ2 are updated by the gradient descent method, and the update formula is θ n ′=θ n -k·dθ n , where k represents the learning rate, preferably 0.003, dθ n is θ n The derivative on J(L') can be derived to obtain And the number of training times K=K+1.
[0086] S403: Calculate the loss result of each contract approval record based on a preset loss function, and average all loss results.
[0087] Example: Substitute 26,000 training set samples into the processing model one by one
[0088]
[0089] After calculation, each sample will get a result value h', which represents the prediction result of the current model for this sample. For each sample, the result value h' and the true value h of the sample itself (for example, 1 passed, 0 failed) are substituted into the loss function:
[0090] L(h',h)=-(hlogh'+(1-h)log(1-h'))
[0091] Calculate the loss result L' of a single sample and average the loss results L' of all samples:
[0092]
[0093] The smaller the result, the higher the accuracy of the model. Compare the loss value J with the system optimal record (the weight value and loss value of the current optimal solution). If J is empty or J(L′)<J, update the system optimal record.
[0094] S404: If the loss result after averaging is less than a preset loss value or the number of training times exceeds a preset threshold, the training is terminated to obtain a trained processing model.
[0095] For example: if the number of training times K exceeds the preset number threshold of 50000, the training is forcibly terminated. If the loss value J of the system's optimal record is greater than the preset loss value 0.00001, step 403 is repeated. If it is less than the preset loss value 0.00001, the training is terminated.
[0096] It is worth noting that the validation set samples can be brought into the processing model Perform calculations, compare with the true value, and calculate the accuracy.
[0097] In addition, it is worth noting that the step S103 of calculating the processing result according to the feedback data may include: calculating the processing value according to the feedback data, calling the preset interval rating model, querying the interval rating corresponding to the processing value, and using the processing value and the interval rating as the processing result. For example: Substitute the feedback data (such as the contract amount, contract term, contract interest rate) into the trained processing model for calculation, and judge according to the processing value of the calculation result. If the processing value corresponds to the interval of 0.5 to 1, it is passed, and if the processing value corresponds to the interval of 0.1 to 0.5, it is not passed.
[0098] In a further embodiment, after the processing report is generated in step S104, the processing report may be converted into the output format in response to the selected output format. For example, structured output in two formats, JSON and XML, is supported.
[0099] It is worth noting that for step S104 of marking the contract document to generate a processing report, the marking information may include a label array: labelkey (label unique identifier), labelName (label name), labelValue (label value, used for the user system to perform architecture), labelDesc (label description, used for display), such as Figure 5 shown.
[0100] In a preferred embodiment, key entities can be modified automatically. For example, a modification engine is called to identify the annotation type (for example, by identifying the annotation type through the tag name), a modification model is matched (for example, if the tag name is a counterparty, the database can be called to match the counterparty information), and the reverse information is obtained by executing the modification model, and the position of the key entity corresponding to the annotation is located to present the reverse information. For example, the matched counterparty can be automatically filled directly, saving the manual input time of the handling personnel. Of course, the handling personnel are allowed to adjust the reverse information and provide feedback on errors to improve the extraction accuracy, such as Figure 6 shown.
[0101] In a further embodiment, step S105 further includes: monitoring the amount of updated data in the contract processing database; in response to the amount of updated data reaching a preset quantity threshold, starting a processing model training program to obtain updated data for processing model training.
[0102] In a further embodiment, for step S105, in response to the modification information marked in the processing report, the preset statistical data corresponding to each annotation is updated, and the processing model is adjusted through the statistical data. For example: the user provides feedback according to the format set by the system, that is, the structured modification information is provided for feedback, such as: data mismatch (label name and label content mismatch, such as Party A's information is filled in Party B's label), data recognition error (whether the content of the label is extracted, such as typos, missing characters, etc.), compliance judgment error (the compliance judgment predicted by the system is incorrect, requiring multi-level approval feedback), and then the statistical data is updated, such as real-time monitoring and updating of statistical data of annotation performance indicators (number of annotation errors, proportion of annotation errors, etc.). When the statistical data meets the preset conditions, the program for adjusting the processing model can be started (for example: if the number of system errors is greater than the preset number threshold, an alarm will be issued and the program for adjusting the processing model will be started).
[0103] Therefore, by collecting and analyzing new contract data and user feedback, the present invention can continuously and automatically update and optimize the machine learning model to improve its adaptability and accuracy, and continuously optimize the steps and parameter settings of the automation process according to actual application conditions and user feedback, thereby realizing accuracy monitoring and performance monitoring and improving overall processing efficiency and user experience.
[0104] The methods provided in the above-mentioned embodiments realize the intelligent processing of commercial factoring contracts, integrate various links into an automated tool chain, and realize end-to-end automated processing from paper contracts to processing results. The automated processing flow reduces the chance of human intervention and reduces the risks caused by human negligence, fatigue or subjective judgment. The machine learning model is trained based on a large amount of data, and can objectively and impartially evaluate the compliance of the contract, reducing human bias and errors. In addition, the present invention establishes an exception handling and user feedback mechanism in the automated process, captures and handles abnormal situations in a timely manner, and continuously optimizes process performance. At the same time, the present invention uses a machine learning model to perform intelligent compliance prediction based on the extracted contract element information, judges whether the contract meets the approval requirements, and realizes intelligent compliance prediction. In addition, with the emergence of new contract formats, terms and regulations, the system can maintain its adaptability and accuracy by updating the training data and model parameters, and can better adapt to the changes and diversity of the contract text.
[0105] See also Figure 7 , shows a schematic flow chart of an optional contract processing method according to an embodiment of the present invention, comprising the following steps:
[0106] S701: Receive a contract processing request and obtain the corresponding contract risk preference indicator.
[0107] S702: According to the contract risk preference level, locate the contract risk preference level and match the time point for starting the contract processing flow.
[0108] S703: In response to reaching the time point for starting the contract processing flow, obtaining the contract text and identifying the type of the contract document.
[0109] S704: calling a preset text type configuration file to determine whether the type is the type information in the text type configuration file, if yes, executing step S706, if no, executing step S705 and then executing step S706.
[0110] S705: Calling a corresponding conversion model according to the text type configuration file to convert the contract document.
[0111] S706: Calling the recognition engine to perform text recognition on the contract text and generate editable text.
[0112] S707: Split the contract text into independent vocabulary units through a word segmentation tool, call a preset entity recognition model to process the vocabulary units, determine key entities and corresponding entity types, use the key entities and corresponding entity types as key information, and generate feedback data.
[0113] Furthermore, the key information can be updated based on arrangement or reclassification, for example: locate the arrangement position of the key entity in the contract text, and update the entity type corresponding to the key entity according to the mapping relationship between the arrangement position and the entity type. Or for example: extract a preset number of participles from the key entity, use the extracted participles together with the key entity as the participles to be matched, then call the preset dictionary, query the participles to be matched, obtain the dictionary value corresponding to the hit participle, and update the dictionary value to the entity type corresponding to the key entity.
[0114] S708: Call the trained preset processing model and calculate the processing result according to the feedback data.
[0115] Furthermore, a processing value is calculated based on the feedback data, a preset interval rating model is called, the interval rating corresponding to the processing value is queried, and the processing value and the interval rating are used as processing results.
[0116] S709: Based on the feedback data, mark it in the contract document and generate a processing report based on the processing results.
[0117] Furthermore, in response to the selected output format, the processing report may be converted into the output format.
[0118] S710: calling the modification engine, identifying the annotation type, matching the modification model, obtaining the reverse display information by executing the modification model, locating the position of the key entity corresponding to the annotation, and presenting the reverse display information.
[0119] S711: In response to the modification information marked in the processing report, update the preset statistical data corresponding to each mark, and adjust the processing model according to the statistical data.
[0120] In addition, the amount of updated data in the contract processing database can be monitored, and in response to the amount of updated data reaching a preset threshold, a processing model training program is started to obtain updated data for processing model training.
[0121] The method provided in the above-mentioned embodiment, the present invention greatly reduces the time and labor cost required for manual processing through automated processing procedures, reduces delays and errors caused by human factors, improves the overall efficiency of processing work, and makes the entire processing process more efficient and fast. The quality inspection and feedback processing and exception mechanism in the automated process can promptly discover and correct identification errors and abnormal situations, further improve the accuracy of processing, and meet the actual needs of users. The generated processing report is detailed and intuitive, which is convenient for processing personnel to quickly understand the contract content and processing results. In addition, the present invention has strong scalability and flexibility, and can be continuously optimized and upgraded with the advancement of technology and changes in business needs. At the same time, the process monitoring and optimization mechanism ensures the stability and reliability of the system and improves the overall operating efficiency.
[0122] See also Figure 8 , which shows a schematic diagram of main modules of a contract processing device 800 provided in an embodiment of the present invention, including:
[0123] The start module 801 is used to receive a contract processing request, obtain the corresponding contract risk preference indicator, and determine the time point for starting the contract processing process.
[0124] The feedback data generation module 802 is used to obtain the contract text, extract key information in the contract document, and generate feedback data in response to the time point of starting the contract processing flow.
[0125] The processing result generation module 803 is used to call the trained preset processing model and calculate the processing result according to the feedback data.
[0126] The processing report generation module 804 is used to mark the contract document based on the feedback data and generate a processing report in combination with the processing results.
[0127] The adjustment module 805 is used to update the preset statistical data corresponding to each annotation in response to the modification information annotated in the processing report, and adjust the processing model through the statistical data.
[0128] In the implementation device of the present invention, the startup module 801 can also be used to obtain the corresponding contract risk preference index, locate the contract risk preference level according to the contract risk preference level, and match the time point for starting the contract processing flow.
[0129] In the implementation device of the present invention, the feedback data generating module 802 may also be used to:
[0130] Identify the type of the contract document, call the preset text type configuration file, and determine whether the type is the type information in the text type configuration file; if so, extract the key information in the contract text; if not, call the corresponding conversion model according to the text type configuration file, convert the contract document, and extract the key information in the converted contract document.
[0131] In the implementation device of the present invention, the feedback data generation module 802 can also be used to: call the recognition engine, perform text recognition on the contract text, generate editable text, and extract key information from the editable text.
[0132] In the implementation device of the present invention, the feedback data generation module 802 can also be used to: split the contract text into independent vocabulary units through a word segmentation tool, call a preset entity recognition model to process the vocabulary units, determine key entities and corresponding entity types; and use the key entities and corresponding entity types as key information.
[0133] In the implementation device of the present invention, the feedback data generation module 802 can also be used to: locate the arrangement position of the key entity in the contract text; and update the entity type corresponding to the key entity according to the mapping relationship between the arrangement position and the entity type.
[0134] In the implementation device of the present invention, the feedback data generation module 802 can also be used to: extract a preset number of participles from the key entity forward, and use the extracted participles together with the key entity as the participles to be matched; call a preset dictionary, query the participles to be matched, obtain the dictionary value corresponding to the hit participle, and update the dictionary value to the entity type corresponding to the key entity.
[0135] In the implementation device of the present invention, the feedback data generation module 802 can also be used to: obtain the weight of each hit participle, and update the dictionary value corresponding to the hit participle with the highest weight to the entity type corresponding to the key entity.
[0136] In the implementation device of the present invention, the processing result generation module 803 can also be used to: collect and pre-process contract approval records according to a preset ratio of passed and failed processing; initialize the parameters of a preset processing model using random values on a Gaussian distribution, and train the initialized processing model based on the pre-processed contract approval records; calculate the loss result of each contract approval record based on a preset loss function, average all loss results, and terminate the training when the loss result after the average processing is less than the preset loss value or the number of training times exceeds the preset number threshold, thereby obtaining a trained processing model.
[0137] In the implementation device of the present invention, the processing result generation module 803 can also be used to update the parameters of the processing model through the gradient descent method.
[0138] In the implementation device of the present invention, the processing report generating module 804 may also be used to: in response to the selected output format, convert the processing report into the output format.
[0139] In the implementation device of the present invention, the processing report generation module 804 can also be used to: call the modification engine, identify the annotation type, match the modification model, and obtain the reverse display information by executing the modification model; locate the position of the key entity corresponding to the annotation and present the reverse display information.
[0140] In the implementation device of the present invention, the processing result generation module 803 can also be used to: monitor the amount of updated data in the contract processing database; in response to the amount of updated data reaching a preset quantity threshold, start the processing model training program to obtain updated data for processing model training.
[0141] In the implementation device of the present invention, the processing result generation module 803 can also be used to: calculate the processing value based on the feedback data, call the preset interval rating model, query the interval rating corresponding to the processing value, and use the processing value and the interval rating as the processing result.
[0142] In addition, the specific implementation content of the device described in the embodiment of the present invention has been described in detail in the method described above, so the repeated content will not be described again here.
[0143] Fig. 9 An exemplary system architecture 900 to which embodiments of the present invention may be applied is shown, including terminal devices 901 , 902 , 903 , a network 904 and a server 905 (only an example).
[0144] Terminal devices 901, 902, 903 can be various electronic devices with display screens and supporting web browsing, and various communication client applications are installed. Users can use terminal devices 901, 902, 903 to interact with server 905 through network 904 to receive or send messages, etc.
[0145] The network 904 is used to provide a medium for communication links between the terminal devices 901, 902, 903 and the server 905. The network 904 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0146] The server 905 may be a server that provides various services, such as a backend management server that provides support for shopping websites browsed by users using terminal devices 501, 502, and 503 (for example only). The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - for example only) to the terminal device. It should be noted that the method provided in the embodiment of the present invention is generally executed by the server 905, and accordingly, the device is generally set in the server 905.
[0147] It should be understood that Fig. 9 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0148] Reference below Fig.10 , which shows a schematic diagram of the structure of a computer system 1000 of a terminal device suitable for implementing an embodiment of the present invention. Fig.10 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0149] like Fig.10As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the system 1000 are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0150] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0151] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, the above-mentioned functions defined in the system of the present invention are executed.
[0152] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0153] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0154] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor including a step extraction module, a task workflow generation module, and a scenario workflow generation module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the scenario workflow generation module may also be described as an "operation and maintenance scenario workflow generation module."
[0155] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes any of the above contract processing methods.
[0156] The computer program product of the present invention includes a computer program, and when the computer program is executed by a processor, the contract processing method in the embodiment of the present invention is implemented.
[0157] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A contract processing method, characterized in that: include: Receive contract processing requests, obtain corresponding contract risk preference indicators, and determine the time point to start the contract processing process; In response to reaching a time point for starting a contract processing flow, obtaining a contract text, extracting key information from the contract document, and generating feedback data; Call the trained preset processing model and calculate the processing result based on the feedback data; Based on the feedback data, mark it in the contract document and generate a processing report based on the processing results; In response to the modification information marked in the processing report, the preset statistical data corresponding to each mark is updated, and the processing model is adjusted according to the statistical data.
2. The method according to claim 1, characterized in that: Obtain the corresponding contract risk appetite indicators and determine the time point to start the contract processing process, including: Obtain the corresponding contract risk preference indicator, locate the contract risk preference level according to the contract risk preference level, and match the time point for starting the contract processing process.
3. The method according to claim 1, characterized in that Before extracting key information from the contract documents, include: Identify the type of the contract document, call a preset text type configuration file, and determine whether the type is the type information in the text type configuration file; If so, extract key information from the contract text; If not, the corresponding conversion model is called according to the text type configuration file to convert the contract document and extract the key information in the converted contract document.
4. The method according to claim 1, characterized in that: Extract key information from contract documents, including: Call the recognition engine to perform text recognition on the contract text, generate editable text, and extract key information from the editable text.
5. The method according to any one of claims 1 to 4, characterized in that: Extract key information from contract documents, including: The contract text is split into independent vocabulary units through the word segmentation tool, and the preset entity recognition model is called to process the vocabulary units to determine the key entities and the corresponding entity types; The key entities and the corresponding entity types are used as key information.
6. The method according to claim 5, characterized in that After determining the key entities and corresponding entity types, including: Locate the arrangement of key entities in the contract text; According to the mapping relationship between the arrangement position and the entity type, the entity type corresponding to the key entity is updated.
7. The method according to claim 5, characterized in that After determining the key entities and corresponding entity types, including: Extract a preset number of segmented words from the key entity, and use the extracted segmented words together with the key entity as the segmented words to be matched; The preset dictionary is called to query the to-be-matched word segmentation, the dictionary value corresponding to the hit word segmentation is obtained, and the dictionary value is updated to the entity type corresponding to the key entity.
8. The method according to claim 7, characterized in that Updating the dictionary value to the entity type corresponding to the key entity includes: The weight of each hit participle is obtained, and the dictionary value corresponding to the hit participle with the highest weight is updated to the entity type corresponding to the key entity.
9. The method according to claim 1, characterized in that: Before calling the trained preset processing model to calculate the feedback data, it includes: Collect and pre-process contract approval records according to the preset ratio of passed and failed processing; Initialize the parameters of the preset processing model using random values on the Gaussian distribution, and train the initialized processing model based on the pre-processed contract approval records; The loss result of each contract approval record is calculated based on the preset loss function, and all loss results are averaged. When the loss result after averaging is less than the preset loss value or the number of training times exceeds the preset threshold, the training is terminated to obtain a trained processing model.
10. The method according to claim 9, characterized in that The initialized processing model is trained based on the pre-processed contract approval records, including: The parameters of the processing model are updated via gradient descent.
11. The method according to claim 1, characterized in that After the processing report is generated, it includes: In response to the selected output format, the processed report is converted into the output format.
12. The method according to claim 1, characterized in that: After the processing report is generated, it includes: Call the modification engine, identify the annotation type, match the modification model, and obtain the reverse display information by executing the modification model; The position of the key entity corresponding to the positioning mark is presented, and the reverse display information is presented.
13. The method according to claim 1, characterized in that Also includes: Monitor the volume of updates to the contract processing database; In response to the amount of updated data reaching a preset quantity threshold, a processing model training program is started to obtain updated data for processing model training.
14. The method according to claim 1, characterized in that The processing results are calculated based on the feedback data, including: The processing value is calculated based on the feedback data, the preset interval rating model is called, the interval rating corresponding to the processing value is queried, and the processing value and interval rating are used as the processing results.
15. A contract processing device, characterized in that: include: The start module is used to receive the contract processing request, obtain the corresponding contract risk preference indicator, and determine the time point to start the contract processing process; A feedback data generation module, for obtaining the contract text, extracting key information from the contract document, and generating feedback data in response to reaching a time point for starting the contract processing flow; The processing result generation module is used to call the trained preset processing model and calculate the processing result according to the feedback data; The processing report generation module is used to mark the contract documents based on the feedback data and generate a processing report based on the processing results; The adjustment module is used to update the preset statistical data corresponding to each annotation in response to the modification information annotated in the processing report, and adjust the processing model through the statistical data.
16. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 14.
17. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.
18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.
Citation Information
Patent Citations
Contract auditing method and device
CN110705952A
Enterprise legal process auxiliary decision-making system and method based on artificial intelligence
CN111144087A
Intelligent contract auditing method and system
CN116720834A
Electronic contract review method and device, and application
CN118247091A