Contract-based business process generation method and device, equipment and storage medium
By identifying and automatically analyzing the contract images, generating process node sequences and matching data, the cumbersome contract execution and monitoring processes in the existing technology are solved, and efficient and accurate contract monitoring and execution are achieved.
Patent Information
- Application Number
- CN202411892659.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, contract execution and monitoring processes are cumbersome and are susceptible to human errors or negligence, resulting in complexity in contract execution and increased risks.
By recognizing the target contract image, the contract title and its content will be automatically extracted, the execution time and content will be determined, the process node sequence will be generated, and the process nodes will be stored in the database. Call the target model to convert user data into problems, perform data matching processing, and update the status of the process node.
It has realized the automation of contract analysis, reduced human intervention, improved the efficiency and accuracy of contract monitoring, and ensured that contract execution is carried out according to the scheduled plan and progress.
Smart Images

Figure CN119831530A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image recognition processing, and in particular to a method, device, equipment and storage medium for generating a contract-based business process. Background Art
[0002] In modern business practice, contracts play a vital role. They are not only the cornerstone of a company's business relationship with suppliers, customers, partners, etc., but also a key document to ensure that the rights and obligations of both parties are legally protected. The existence of a contract provides a legal basis for the long-term and stable cooperation between the company and its partners, and at the same time standardizes the operating procedures to ensure that business activities can proceed smoothly according to established rules.
[0003] The execution process of service and engineering contracts involves multiple links from the signing of the contract to its final completion. Each link has clear constraints and completion marks. These links have extremely high timeliness requirements. Any failure to meet the contract constraints or exceed the time limit may lead to a breach of contract, which in turn may bring potential losses to both parties. Therefore, it is necessary to monitor the execution of the contract.
[0004] In the prior art, the execution and monitoring process of a contract is usually cumbersome. Specifically, this process usually involves uploading data to a database and then manually reviewing the uploaded data to determine whether it complies with the contract provisions. This process is not only time-consuming, but also susceptible to human errors or negligence. If non-compliant data is uploaded to the database due to human error, resulting in failure to execute in accordance with the contract requirements, deletion, modification or resubmission may be required. These subsequent steps may further complicate the process and may also introduce more errors or omissions, increasing the complexity and risk of contract execution. Summary of the invention
[0005] The technical problem to be solved by the present application is to provide a method, device, equipment and storage medium for generating a business process based on a contract, which can reduce human intervention and improve the efficiency and accuracy of contract monitoring.
[0006] In order to solve the above technical problems, the present application provides a contract-based business process generation method, including: performing content recognition processing on the acquired target contract image to obtain multiple contract titles and contract title contents corresponding to each of the multiple contract titles, and determining a first execution time and a first execution content based on the contract title contents; based on the first execution time, sorting the multiple contract titles to generate a contract title sequence, converting the contract title sequence into a process node sequence, and using the first execution content as a process node task corresponding to each process node in the process node sequence; storing the process node sequence and the process node tasks corresponding to each process node in the process node sequence into a target database; obtaining first user data input by a user in a first dialogue interface, calling a target model to convert the first user data into a first user question, and performing data matching processing on the target database based on the first user question to obtain a first data matching result; when the first data matching result is a successful data match, storing the first user data in the target database, and updating the process node execution status corresponding to each process node in the process node sequence.
[0007] In a possible implementation, first user data input by a user in a first dialogue interface is obtained, and a target model is called to convert the first user data into a first user question, specifically including: when it is detected that the user inputs the first user data in the first dialogue interface, the target model is called to retrieve the process node execution status corresponding to each process node in the process node sequence in the target database, determining that the process node execution status is an executing process node, and generating a corresponding push keyword based on the target process node; based on the first dialogue interface, the push keyword is pushed to the user, and in response to the user's selection operation on the push keyword, a target keyword is obtained; based on the target keyword and the first user data, a first user question is generated.
[0008] In a possible implementation, a first user question is generated based on the target keyword and the first user data, specifically including: associating the target keyword and the first user data to obtain a first associated phrase; obtaining a preset encapsulated extracted word, encapsulating the first associated phrase with the encapsulated extracted word to obtain a first encapsulated question; calling the target model to determine whether the first encapsulated question contains time, and if so, returning the first time contained in the first encapsulated question, otherwise, returning the system time; when it is detected that the return data of the target model is the first time, using the first associated phrase as the first user question, and using the first time as the real-time system time corresponding to the first user question; when it is detected that the return data of the target model is the system time, using the first associated phrase as the first user question, and using the system time as the real-time system time corresponding to the first user question.
[0009] In a possible implementation, based on the first user question, data matching processing is performed on the target database to obtain a first data matching result, which specifically includes: based on the target keyword in the first user question, determining the target process node, and obtaining the target process node task and target process node execution time corresponding to the target process node; obtaining the real-time system time in the first user question, and determining whether the real-time system time falls within the target process node execution time, and if so, generating a corresponding task check template based on the target process node task, wherein the task check template includes a task check item number and a task check item corresponding to the task check item number; extracting first detection data from the first user data according to the task check item corresponding to the task check item number, and performing inspection processing on the first detection data to obtain a task check result corresponding to the task check item; and obtaining the first data matching result based on the task check result.
[0010] In one possible implementation, content recognition processing is performed on the acquired target contract image to obtain multiple contract titles and contract title content corresponding to each of the multiple contract titles, specifically including: inputting the acquired target contract image into a pre-trained image segmentation model so that the image segmentation model determines the bounding box coordinates corresponding to each contract title in the target image, and based on the bounding box coordinates, segmenting the target contract image to obtain multiple contract title images and contract title content images corresponding to each of the multiple contract title images; performing text recognition on the multiple contract title images based on a text recognition algorithm to obtain multiple first contract titles, and screening the multiple first contract titles based on a preset standard contract title set to obtain multiple screened contract titles; performing text recognition on the contract title content images corresponding to each of the multiple contract titles based on a text recognition algorithm to obtain contract title content corresponding to each of the multiple contract titles.
[0011] In a possible implementation, determining the first execution time and the first execution content based on the contract title content specifically includes: obtaining a standard contract template, wherein the standard contract template includes content keywords corresponding to each standard contract title content; matching the contract title content with all standard contract title contents in the standard contract template to obtain target standard contract content, and obtaining target content keywords corresponding to the target standard contract content; obtaining the keyword quantity of the target content keywords, and when the keyword quantity is 1, using the contract title content as the first execution content of the contract title corresponding to the contract title content; performing character matching on the first execution content based on a preset time regular expression. to obtain the first execution time of the contract title corresponding to the contract title content; when the number of keywords is greater than 1, the target content keyword is used as the sub-contract title of the contract title corresponding to the contract title content, and the contract title content is content classified based on the sub-contract title to obtain the sub-contract title content corresponding to each sub-contract title, and all sub-contract title contents are integrated to obtain the first execution content of the contract title corresponding to the contract title content; based on the preset time regular expression, each sub-contract title content is character matched to obtain the first sub-execution time corresponding to the sub-contract title content, and all first sub-execution times are integrated to obtain the first execution time of the contract title corresponding to the contract title content.
[0012] In one possible implementation, the multiple contract titles are sorted based on the first execution time to generate a contract title sequence, which specifically includes: obtaining the first execution time corresponding to each of the multiple contract titles, and sorting the multiple contract titles based on the chronological order of the first execution times to obtain a first contract title sequence; traversing each contract title in the first contract title sequence, and when it is detected that the sub-contract title exists in the target contract title, obtaining the target first sub-execution time of the target sub-contract title content corresponding to the target sub-contract title, and arranging the target sub-contract titles based on the chronological order of the target first sub-execution times to obtain a target sub-contract title sequence of the target contract title; updating the target sub-contract title in the first contract title sequence to a target sub-contract title sequence to obtain a contract title sequence.
[0013] The present application also provides a contract-based business process generation device, including: an image recognition module, a process node sequence generation module, a process node storage module, a data matching module and a process node update module; wherein the image recognition module is used to perform content recognition processing on the acquired target contract image to obtain multiple contract titles and the contract title content corresponding to each of the multiple contract titles, and determine a first execution time and a first execution content based on the contract title content; the process node sequence generation module is used to sort the multiple contract titles based on the first execution time, generate a contract title sequence, convert the contract title sequence into a process node sequence, and use the first execution content as each in the process node sequence. The process node storage module is used to store the process node sequence and the process node tasks corresponding to each process node in the process node sequence into a target database; the data matching module is used to obtain the first user data input by the user in the first dialogue interface, call the target model to convert the first user data into a first user question, and perform data matching processing on the target database based on the first user question to obtain a first data matching result; the process node update module is used to store the first user data in the target database when the first data matching result is a successful data matching, and update the process node execution status corresponding to each process node in the process node sequence.
[0014] The present application embodiment provides a method, device, equipment and storage medium for generating a business process based on a contract, which has the following beneficial effects compared with the prior art:
[0015] By performing content recognition on the target contract image, the contract title in the contract and its corresponding contract title content are automatically extracted, thereby realizing the automation of contract analysis; based on the recognition of the contract title content, the system can automatically determine the first execution time and the first execution content under each contract title; and based on the first execution time and the first execution content, a contract title sequence and a process node task corresponding to each process node in the process node sequence are generated, and the process node sequence and the process node task corresponding to each process node in the process node sequence are stored in the target database, which can effectively provide clear time nodes and task guidance for the subsequent execution of the contract and reduce the confusion that may arise during the execution process; by calling the target model, the first user data input by the user is matched with the target database to determine whether the data uploaded by the user meets the requirements of the process node sequence, thereby realizing automated data analysis; when the first data matching result is a successful data match, the first user data is stored in the target database, and the process node execution status corresponding to each process node in the process node sequence is updated; when the contract execution status changes, the process node sequence is updated in time; this enables the system to be adjusted at any time during the execution process to ensure that the contract execution is carried out according to the predetermined plan and schedule, which can reduce human intervention and improve the efficiency and accuracy of contract monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flowchart of an embodiment of a method for generating a business process based on a contract provided by the present application;
[0017] Figure 2 It is a structural diagram of an embodiment of a contract-based business process generation device provided by the present application;
[0018] Figure 3 It is a structural schematic diagram of a terminal device provided by the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0020] Example 1, see Figure 1 , Figure 1 is a flowchart of an embodiment of a contract-based business process generation method provided by the present application, such as Figure 1 As shown, the method includes steps 101 to 105, which are specifically as follows:
[0021] Step 101: Perform content recognition processing on the acquired target contract image to obtain multiple contract titles and contract title contents corresponding to each of the multiple contract titles, and determine a first execution time and a first execution content based on the contract title contents.
[0022] In one embodiment, a target contract image corresponding to a target contract is obtained, wherein the target contract is a service contract or an engineering contract.
[0023] In one embodiment, the acquired target contract image is input into a pre-trained image segmentation model so that the image segmentation model determines the bounding box coordinates corresponding to each contract title in the target image, and based on the bounding box coordinates, the target contract image is segmented to obtain multiple contract title images and contract title content images corresponding to each of the multiple contract title images.
[0024] Specifically, the pre-trained image segmentation model includes a title localization model and an image segmentation model.
[0025] Specifically, the acquired target contract image is input into the title positioning model so that the title positioning model outputs the bounding box coordinates corresponding to each contract title, wherein the bounding box coordinates include the coordinates of the upper left corner of the bounding box and the right coordinates of the bounding box; the bounding box coordinates corresponding to each contract title and the target contract image are input into the image segmentation model so that the image segmentation model performs a horizontal cutting process on the target contract image based on the coordinates of the upper left corner of the bounding box to obtain a first cutting image corresponding to each contract title, and performs a horizontal cutting process on the first cutting image based on the right coordinates of the bounding box corresponding to each contract title to obtain an image on a cutting line as a contract title image, and the image under the cutting line is used as a contract title content image corresponding to the contract title image.
[0026] Specifically, the model training process of the title positioning model includes obtaining historical contract images, and performing bounding box annotation processing on the historical contract title image areas corresponding to the historical contract images. The model will be trained based on the historical contract images with bounding box annotations, wherein the bounding box covers the contract title part in the image, and a single bounding box corresponds to a contract title.
[0027] In one embodiment, text recognition is performed on the multiple contract title images based on a text recognition algorithm to obtain multiple first contract titles, and the multiple first contract titles are screened based on a preset standard contract title set to obtain multiple screened contract titles.
[0028] Specifically, the text recognition algorithm is an OCR algorithm; based on the OCR algorithm, image analysis is performed on the multiple contract title images respectively, text information in the contract title images is extracted, and the text information is converted into a text format to obtain multiple first contract titles.
[0029] Specifically, the standard contract title set is a pre-defined set of compliant contract titles, which usually includes some common and standardized contract title formats; preferably, the standard contract title set includes project initiation, project service content and project acceptance.
[0030] Specifically, multiple first contract titles are matched with a preset set of standard contract titles respectively. When there is a standard contract title that is the same as the first contract title in the standard contract titles, the current first contract title is retained; otherwise, the current first contract title is deleted to obtain multiple contract title pairs that have been screened.
[0031] Specifically, since not all contract title contents under all contract titles in the contract are contents that need to be executed, and some explanatory information is also included, therefore, by setting a standard contract title set to filter and process the multiple first contract titles, the efficiency of subsequent data can be improved.
[0032] In one embodiment, based on a text recognition algorithm, text recognition is performed on the contract title content images corresponding to each of the multiple contract titles to obtain the contract title contents corresponding to each of the multiple contract titles.
[0033] Specifically, the text recognition algorithm is an OCR algorithm; based on the OCR algorithm, image analysis is performed on the multiple contract title content images respectively, text information in the contract title content images is extracted, and it is converted into a text format to obtain the contract title content corresponding to each of the multiple contract titles.
[0034] In one embodiment, a standard contract template is obtained, wherein the standard contract template includes content keywords corresponding to each standard contract title content.
[0035] Specifically, a standard contract template is obtained, wherein the standard contract template contains multiple standard contract titles, such as "project start", "project service content", "project acceptance", etc. Each standard contract title has a group of "content keywords" related thereto. For example, for "project start", it may contain content keywords such as "Party B service requirements" and "Party A responsibilities", and for "project service content", it may contain content keywords such as "project monthly inspection" and "project quarterly inspection", and the content keywords are used as content keywords corresponding to the standard contract title content corresponding to the standard contract title.
[0036] In one embodiment, the contract title content is matched with all standard contract title contents in the standard contract template to obtain target standard contract content, and target content keywords corresponding to the target standard contract content are obtained.
[0037] Specifically, when matching the contract title content, the contract title corresponding to the contract title content is obtained, and the standard contract titles corresponding to all the standard contract title contents in the standard contract template are obtained, and the contract title is matched with each standard contract title respectively. When a standard contract title identical to the contract title is matched, the target standard contract content corresponding to the matched standard contract title is used as the target standard contract content of the contract title content corresponding to the contract title, and based on the standard contract template, the target content keywords corresponding to the target standard contract content are directly obtained.
[0038] In one embodiment, the keyword quantity of the target content keyword is obtained, and when the keyword quantity is 1, the contract title content is used as the first execution content of the contract title corresponding to the contract title content.
[0039] Specifically, if there is only one target content keyword in the target standard contract content, such as "Party B's service requirements", the content of the contract title will be directly regarded as the first executive content of the corresponding contract title; that is, the executive content under the contract title has been determined and does not need to be further decomposed.
[0040] In one embodiment, based on a preset time regular expression, character matching processing is performed on the first execution content to obtain the first execution time of the contract title corresponding to the contract title content.
[0041] Specifically, if the content of each sub-contract title contains a clear time point, for example, the contract clearly stipulates the "project start date" or "delivery date", the system will extract these dates based on regular expressions to obtain the first execution time of the contract title corresponding to the contract title content.
[0042] In one embodiment, when the number of keywords is greater than 1, the target content keyword is used as the sub-contract title of the contract title corresponding to the contract title content, and the contract title content is content classified based on the sub-contract title to obtain the sub-contract title content corresponding to each sub-contract title, and all sub-contract title contents are integrated to obtain the first execution content of the contract title corresponding to the contract title content.
[0043] Specifically, if there are multiple target content keywords in the target standard contract content, such as "Party B service requirements" and "Party A responsibilities", the "Party B service requirements" and "Party A responsibilities" will be used as sub-contract titles under the "Project Startup" contract title.
[0044] Specifically, based on the sub-contract title, the text content corresponding to each sub-contract title is extracted from the contract title content to obtain the sub-contract title content corresponding to each sub-contract title.
[0045] In one embodiment, based on a preset time regular expression, character matching processing is performed on the content of each sub-contract title to obtain the first sub-execution time corresponding to the sub-contract title content, and all first sub-execution times are integrated to obtain the first execution time of the contract title corresponding to the contract title content.
[0046] Specifically, if there are clear time points in the contents of multiple sub-contract titles, the system will perform regular matching on the contents of each sub-contract title based on the preset time regular expression, extract the corresponding first sub-execution time, and use all first sub-execution times as the first execution time of the contract title corresponding to the contract title content.
[0047] Step 102: Based on the first execution time, the multiple contract titles are sorted to generate a contract title sequence, the contract title sequence is converted into a process node sequence, and the first execution content is used as a process node task corresponding to each process node in the process node sequence.
[0048] In one embodiment, the first execution time corresponding to each of the plurality of contract titles is obtained, and the plurality of contract titles are sorted based on the sequence of the first execution times to obtain a first contract title sequence.
[0049] Specifically, based on the first execution time corresponding to each of the multiple contract titles, a first-level sorting is performed to obtain a first contract title sequence.
[0050] In one embodiment, each contract title in the first contract title sequence is traversed, and when the existence of the sub-contract title is detected in the target contract title, the target first sub-execution time of the target sub-contract title content corresponding to the target sub-contract title is obtained, and based on the chronological order of the target first sub-execution time, the target sub-contract titles are arranged to obtain the target sub-contract title sequence of the target contract title.
[0051] Specifically, the first contract title sequence after the first-level sorting is traversed. During the traversal process, if there is a target sub-contract title in the target contract title in the first contract title sequence, a secondary sorting is performed based on the target first sub-execution time corresponding to the target sub-contract title in the target contract title to obtain the target sub-contract title sequence of the target contract title.
[0052] In one embodiment, the target sub-contract title in the first contract title sequence is updated to a target sub-contract title sequence to obtain a contract title sequence.
[0053] Specifically, the contract titles and sub-contract titles are sorted based on the contract title sequence.
[0054] In one embodiment, when converting the contract title sequence into a process node sequence, each contract title in the contract title sequence is mapped into a corresponding process node, and the process nodes are sorted based on the order of the contract title sequence to obtain a process node sequence.
[0055] Specifically, a sequence number is set in the process node sequence to indicate the order in which the process nodes are executed. A smaller sequence number indicates that the node is executed first, and a larger sequence number indicates that the node is executed later.
[0056] Specifically, the contract title in the contract title sequence is used as the process node name of the process node in the process node sequence, and the sub-contract title in the contract title sequence is used as the process node name of the sub-process node corresponding to the process node in the process node sequence.
[0057] In one embodiment, when the first execution content is used as the process node task corresponding to each process node in the process node sequence, the first execution content corresponding to the contract title in the contract title sequence is bound to the process node corresponding to the contract title, so as to realize the first execution content as the process node task corresponding to each process node in the process node sequence.
[0058] In one embodiment, the contract titles of each stage in the target contract are sequentially converted into an execution process node sequence, and a corresponding task, i.e., the first execution content, is bound to each process node in the process node sequence; the execution form based on the process is determined to execute the contracts in the defined order, which facilitates the subsequent query, management and tracking of the contract progress.
[0059] Step 103: Store the process node sequence and the process node task corresponding to each process node in the process node sequence into a target database.
[0060] In one embodiment, a process node table is constructed, wherein the process node table is used to store process node sequence information corresponding to the process node sequence, including process node names, process node sequence numbers, etc.
[0061] In one embodiment, a process node task table is constructed, wherein the process node task table is used to store detailed information of the first execution content corresponding to each process node in the process node sequence, and the first execution time corresponding to the first execution content, including the process node name, the process node execution time, the process node execution task description and the process node execution status.
[0062] In one embodiment, based on the process node name, the process node table and the process node task table are associated, and the associated process node table and the process node task table are stored in a target database to implement the storage of the process node sequence and the process node tasks corresponding to each process node in the process node sequence.
[0063] In one embodiment, since in an automated workflow, the database can be used as a basis for task execution, helping the system determine the execution order of process nodes and the execution of related tasks, the detailed execution tasks and time of each node can be queried, and the task execution status can be tracked.
[0064] In one embodiment, the target database determines the execution status of each process node in the process node sequence based on the process node execution time corresponding to each process node in the process node task table; if the current time falls within the first process node time corresponding to the first process node, the process node execution status of the first process node is set to being executed; if the current time does not reach the first process node time corresponding to the first process node, the process node execution status of the first process node is set to being not executed; if the current time exceeds the first process node time corresponding to the first process node, and the current process node execution status of the first process node is being executed, the current process node execution status of the first process node is adjusted from being executed to being overdue.
[0065] Step 104: Obtain first user data input by the user in the first dialogue interface, call the target model to convert the first user data into a first user question, and perform data matching processing on the target database based on the first user question to obtain a first data matching result.
[0066] In one embodiment, the target model is a Char GPT model.
[0067] In one embodiment, the first dialogue interface is a dialogue page obtained after the user initiates a question in the AIChat interface when uploading the first user data of the process node. It is generated through front-end initialization and is used to display the interactive interface of the target model.
[0068] In one embodiment, the first user data is data required by each process node during the contract execution process.
[0069] In one embodiment, when it is detected that a user enters first user data in a first dialogue interface, the target model is called to retrieve the process node execution status corresponding to each process node in the process node sequence in the target database, the process node execution status is determined to be an executing process node, and based on the executing process node, a corresponding push keyword is generated.
[0070] Specifically, the target model acquires the process node execution status corresponding to the process node in the process node sequence stored in the target database by calling the API interface of the target database.
[0071] Preferably, the API interface can provide functions such as obtaining the execution status of a process node and querying the execution status of a specific process node.
[0072] Specifically, the target model sends a query instruction of the process node being executed to the target database based on the API interface, so that the target database returns the execution process node whose execution status of the process node is being executed.
[0073] Specifically, the process node name corresponding to the execution process node is used as the corresponding push keyword.
[0074] Preferably, since the number of the execution process nodes being executed may be one or more, the number of the pushed keywords obtained may also be one or more.
[0075] In one embodiment, based on the first dialogue interface, the push keyword is pushed to the user, and in response to the user's selection operation on the push keyword, a target keyword is obtained.
[0076] Specifically, after the push keyword is obtained, the push keyword is returned to the front end, and the push keyword is displayed to the user based on the first dialogue interface.
[0077] Specifically, when the user selects a push keyword by clicking the mouse or touching the finger, the target keyword field is obtained by responding to the selection operation acting on the push keyword.
[0078] In one embodiment, when generating a first user question based on the target keyword and the first user data, the target keyword and the first user data are specifically associated to obtain a first associated phrase; a preset encapsulated extracted word is obtained, and the first associated phrase and the encapsulated extracted word are encapsulated to obtain a first encapsulated question; the target model is called to determine whether the first encapsulated question contains time, and if so, the first time contained in the first encapsulated question is returned, otherwise, the system time is returned; when it is detected that the return data of the target model is the first time, the first associated phrase is used as the first user question, and the first time is used as the real-time system time corresponding to the first user question; when it is detected that the return data of the target model is the system time, the first associated phrase is used as the first user question, and the system time is used as the real-time system time corresponding to the first user question.
[0079] Specifically, the target keyword is used as the key name, and the first user data is used as the key value to construct a key-value pair, and the key-value pair is used as the first associated phrase.
[0080] Specifically, the preset encapsulated extraction word is whether {} contains time?
[0081] Specifically, the first associated phrase is encapsulated with the encapsulated extraction word, and the first encapsulated question obtained is: Does {the first associated phrase} contain time? Based on the preset encapsulated extraction word, the first associated phrase is encapsulated to ensure that the question format meets the expected requirements.
[0082] It must be in the format or syntax required by the system to facilitate further processing.
[0083] Specifically, when the target model determines that the first encapsulation problem contains included time, based on the preset time regular expression, the first time contained in the first encapsulation problem is obtained and returned; when the target model determines that the first encapsulation problem does not contain included time, the real-time system time is directly returned.
[0084] Specifically, when it is detected that the return data of the target model is the system time, the first associated phrase is used as the first user question, and the system time is used as the real-time system time corresponding to the first user question.
[0085] In one embodiment, based on the target keyword in the first user question, a target process node is determined, and a target process node task and a target process node execution time corresponding to the target process node are obtained.
[0086] Specifically, based on the target keyword, a process node with the same name as the target keyword is obtained from the process node sequence as the target process node.
[0087] In one embodiment, the real-time system time in the first user question is obtained, and it is determined whether the real-time system time falls within the execution time of the target process node. If so, a corresponding task check template is generated based on the target process node task, wherein the task check template includes a task check item number and a task check item corresponding to the task check item number.
[0088] Specifically, if it is determined that the real-time system time does not fall within the target process node execution time, a prompt to re-output the first user data is returned to the user based on the first dialogue interface, so that the user re-outputs the first user data based on the prompt.
[0089] Specifically, the task check template includes a task check item number, and each task check item number corresponds to a specific task check item. These task check items are generated according to the task requirements of the target process node task corresponding to the target process node, and are used for subsequent detailed inspection of the first user data input by the user; preferably, the task check items may cover various contents related to the contract requirements, such as whether the execution complies with the specifications, etc.
[0090] In one embodiment, according to the task inspection item corresponding to the task inspection item number, first detection data is extracted from the first user data, and the first detection data is inspected and processed to obtain a task inspection result corresponding to the task inspection item.
[0091] Specifically, based on natural language processing technology, the first test data corresponding to the task inspection item is extracted from the first user data, and the extracted first test data is checked, and the check includes verifying whether the data is complete, whether it meets the standards or whether it meets the constraints. According to the inspection results, the task inspection result corresponding to the task inspection item is given; for example, if the first test data meets the requirements, the system will return a task inspection result of "compliant"; if not, it will return a task inspection result of "non-compliant".
[0092] In one embodiment, the first data matching result is obtained based on the task inspection result.
[0093] Specifically, the task inspection results corresponding to all task inspection items are obtained. When any task inspection result is non-compliant, the first data matching result is determined to be a data matching failure; when no task inspection result is non-compliant, the first data matching result is determined to be a data matching success.
[0094] Step 105: When the first data matching result is a successful data match, the first user data is stored in the target database, and the process node execution status corresponding to each process node in the process node sequence is updated.
[0095] In one embodiment, when the first data matching result is a successful data match, the first user data is associated with the target process node based on the target process node corresponding to the first data matching result, so that the first user data is stored in the target database.
[0096] In one embodiment, when it is detected that there is a target process node in the process node sequence that has an association relationship with the first user data, the process node execution state corresponding to the target process node is adjusted to executed.
[0097] Example 2, see Figure 2 , Figure 2 is a structural diagram of an embodiment of a contract-based business process generation device provided by the present application, such as Figure 2 As shown, the device includes an image recognition module 201, a process node sequence generation module 202, a process node storage module 203, a data matching module 204 and a process node update module 205, which are specifically as follows:
[0098] The image recognition module 201 is used to perform content recognition processing on the acquired target contract image to obtain multiple contract titles and contract title contents corresponding to each of the multiple contract titles, and determine the first execution time and the first execution content based on the contract title contents.
[0099] The process node sequence generation module 202 is used to sort the multiple contract titles based on the first execution time, generate a contract title sequence, convert the contract title sequence into a process node sequence, and use the first execution content as the process node task corresponding to each process node in the process node sequence.
[0100] The process node storage module 203 is used to store the process node sequence and the process node task corresponding to each process node in the process node sequence into a target database.
[0101] The data matching module 204 is used to obtain first user data input by the user in the first dialogue interface, call the target model to convert the first user data into a first user question, and perform data matching processing on the target database based on the first user question to obtain a first data matching result.
[0102] The process node updating module 205 is used to store the first user data in the target database and update the process node execution status corresponding to each process node in the process node sequence when the first data matching result is a data matching success.
[0103] In one embodiment, the data matching module 204 is used to obtain first user data input by the user in the first dialogue interface, and call the target model to convert the first user data into a first user question, specifically including: when it is detected that the user inputs the first user data in the first dialogue interface, calling the target model to retrieve the process node execution status corresponding to each process node in the process node sequence in the target database, determining that the process node execution status is an executing process node, and generating a corresponding push keyword based on the executing process node; based on the first dialogue interface, pushing the push keyword to the user, and obtaining the target keyword in response to the user's selection operation of the push keyword; generating the first user question based on the target keyword and the first user data.
[0104] In one embodiment, the data matching module 204 is used to generate a first user question based on the target keyword and the first user data, specifically including: associating the target keyword and the first user data to obtain a first associated phrase; obtaining a preset encapsulated extracted word, encapsulating the first associated phrase with the encapsulated extracted word to obtain a first encapsulated question; calling the target model to determine whether the first encapsulated question contains time, and if so, returning the first time contained in the first encapsulated question, otherwise, returning the system time; when it is detected that the return data of the target model is the first time, using the first associated phrase as the first user question, and using the first time as the real-time system time corresponding to the first user question; when it is detected that the return data of the target model is the system time, using the first associated phrase as the first user question, and using the system time as the real-time system time corresponding to the first user question.
[0105] In one embodiment, the data matching module 204 is used to perform data matching processing on the target database based on the first user question to obtain a first data matching result, specifically including: determining the target process node based on the target keyword in the first user question, and obtaining the target process node task and target process node execution time corresponding to the target process node; obtaining the real-time system time in the first user question, and determining whether the real-time system time falls within the target process node execution time, and if so, generating a corresponding task check template based on the target process node task, wherein the task check template includes a task check item number and a task check item corresponding to the task check item number; extracting first detection data from the first user data according to the task check item corresponding to the task check item number, and performing inspection processing on the first detection data to obtain a task check result corresponding to the task check item; and obtaining the first data matching result based on the task check result.
[0106] In one embodiment, the image recognition module 201 is used to perform content recognition processing on the acquired target contract image to obtain multiple contract titles and contract title content corresponding to each of the multiple contract titles, specifically including: inputting the acquired target contract image into a pre-trained image segmentation model so that the image segmentation model determines the bounding box coordinates corresponding to each contract title in the target image, and based on the bounding box coordinates, segmenting the target contract image to obtain multiple contract title images and contract title content images corresponding to each of the multiple contract title images; performing text recognition on the multiple contract title images based on a text recognition algorithm to obtain multiple first contract titles, and screening the multiple first contract titles based on a preset standard contract title set to obtain multiple screened contract titles; performing text recognition on the contract title content images corresponding to each of the multiple contract titles based on a text recognition algorithm to obtain contract title content corresponding to each of the multiple contract titles.
[0107] In one embodiment, the image recognition module 201 is used to determine the first execution time and the first execution content based on the contract title content, specifically including: obtaining a standard contract template, wherein the standard contract template includes content keywords corresponding to each standard contract title content; matching the contract title content with all standard contract title contents in the standard contract template to obtain target standard contract content, and obtaining target content keywords corresponding to the target standard contract content; obtaining the keyword quantity of the target content keywords, and when the keyword quantity is 1, using the contract title content as the first execution content of the contract title corresponding to the contract title content; matching the first execution content based on a preset time regular expression The first execution time of the contract title corresponding to the contract title content is obtained by character matching processing; when the number of keywords is greater than 1, the target content keyword is used as the sub-contract title of the contract title corresponding to the contract title content, and the contract title content is content classified based on the sub-contract title to obtain the sub-contract title content corresponding to each sub-contract title, and all sub-contract title contents are integrated to obtain the first execution content of the contract title corresponding to the contract title content; based on the preset time regular expression, each sub-contract title content is character matched, and the first sub-execution time corresponding to the sub-contract title content is obtained, and all first sub-execution times are integrated to obtain the first execution time of the contract title corresponding to the contract title content.
[0108] In one embodiment, the process node sequence generation module 202 is used to sort the multiple contract titles based on the first execution time to generate a contract title sequence, specifically including: obtaining the first execution time corresponding to each of the multiple contract titles, and sorting the multiple contract titles based on the sequence of the first execution times to obtain a first contract title sequence; traversing each contract title in the first contract title sequence, and when it is detected that the sub-contract title exists in the target contract title, obtaining the target first sub-execution time of the target sub-contract title content corresponding to the target sub-contract title, and arranging the target sub-contract titles based on the sequence of the target first sub-execution times to obtain a target sub-contract title sequence of the target contract title; updating the target sub-contract title in the first contract title sequence to a target sub-contract title sequence to obtain a contract title sequence.
[0109] The above-mentioned contract-based business process generation device can implement the contract-based business process generation method of the above-mentioned method embodiment. The options in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here.
[0110] Figure 3 A schematic diagram of the structure of a terminal device. Figure 3 As shown, the terminal device 3 of this embodiment includes: at least one processor 301 ( Figure 3 Only one is shown in the figure) a processor, a memory 302, and a computer program 303 stored in the memory 302 and executable on at least one processor 301, and when the processor 301 executes the computer program 303, the steps in any of the above method embodiments are implemented.
[0111] The terminal device 3 may be a computing device such as a smart phone, a laptop, a tablet computer, and a desktop computer. The terminal device may include but is not limited to a processor 301 and a memory 302. Those skilled in the art will appreciate that Figure 3 It is only an example of the terminal device 3 and does not constitute a limitation on the terminal device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0112] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0113] In some embodiments, the memory 302 may be an internal storage unit of the terminal device 3, such as a hard disk or memory of the terminal device 3. In other embodiments, the memory 302 may also be an external storage device of the terminal device 3, such as a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device 3. Further, the memory 302 may also include both an internal storage unit and an external storage device of the terminal device 3. The memory 302 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of a computer program, etc. The memory 302 may also be used to temporarily store data that has been output or is to be output.
[0114] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0115] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code includes one or more executable instructions for realizing a 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 that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes also be executed in the opposite order, depending on the functions involved.
[0116] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a terminal device to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0117] In summary, the present application provides a contract-based business process generation method, device, equipment and storage medium, which obtains multiple contract titles and their corresponding contract title contents in the target contract image, and determines the first execution time and the first execution content based on the contract title content; based on the first execution time, sorts the multiple contract titles into a process node sequence, and uses the first execution content as the process node task of each process node; stores the process node sequence and its process node tasks in a target database; calls the target model to convert the first user data input by the user into a first user question, which is used to perform data matching processing on the target database. When the data match is successful, the first user data is stored in the target database, and the process node execution status corresponding to each process node in the process node sequence is updated; compared with the prior art, the technical solution of the present application can reduce human intervention and improve the efficiency and accuracy of contract monitoring.
[0118] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present application. These improvements and substitutions should also be regarded as the scope of protection of the present application.
Claims
1. A method for generating a business process based on a contract, characterized in that: include: Performing content recognition processing on the acquired target contract image to obtain multiple contract titles and contract title contents corresponding to each of the multiple contract titles, and determining a first execution time and a first execution content based on the contract title contents; Based on the first execution time, the multiple contract titles are sorted to generate a contract title sequence, the contract title sequence is converted into a process node sequence, and the first execution content is used as a process node task corresponding to each process node in the process node sequence; The process node sequence and the process node task corresponding to each process node in the process node sequence are stored in a target database; Acquire first user data input by a user in a first dialogue interface, call a target model to convert the first user data into a first user question, and perform data matching processing on the target database based on the first user question to obtain a first data matching result; When the first data matching result is a successful data match, the first user data is stored in the target database, and the process node execution state corresponding to each process node in the process node sequence is updated.
2. A method for generating a business process based on a contract as claimed in claim 1, characterized in that: Acquiring first user data input by a user in a first dialogue interface, and calling a target model to convert the first user data into a first user question, specifically includes: When it is detected that the user inputs the first user data in the first dialogue interface, the target model is called to retrieve the process node execution status corresponding to each process node in the process node sequence in the target database, the process node execution status is determined to be an executing process node, and a corresponding push keyword is generated based on the executing process node; Based on the first dialogue interface, the push keyword is pushed to the user, and in response to the user's selection operation of the push keyword, a target keyword is obtained; A first user question is generated based on the target keyword and the first user data.
3. A method for generating a business process based on a contract as claimed in claim 2, characterized in that: Generating a first user question based on the target keyword and the first user data specifically includes: Associating the target keyword with the first user data to obtain a first associated phrase; Obtaining a preset encapsulation extraction word, encapsulating the first associated phrase and the encapsulation extraction word to obtain a first encapsulation question; Calling the target model to determine whether the first encapsulated problem contains time, if so, returning the first time contained in the first encapsulated problem, otherwise, returning the system time; When it is detected that the return data of the target model is the first time, the first associated phrase is used as a first user question, and the first time is used as a real-time system time corresponding to the first user question; When it is detected that the return data of the target model is the system time, the first associated phrase is used as the first user question, and the system time is used as the real-time system time corresponding to the first user question.
4. A method for generating a business process based on a contract as claimed in claim 3, characterized in that: Based on the first user question, data matching processing is performed on the target database to obtain a first data matching result, which specifically includes: Based on the target keyword in the first user question, determine a target process node, and obtain a target process node task and a target process node execution time corresponding to the target process node; Obtain the real-time system time in the first user question, determine whether the real-time system time falls within the target process node execution time, and if so, generate a corresponding task check template based on the target process node task, wherein the task check template includes a task check item number and a task check item corresponding to the task check item number; According to the task inspection item corresponding to the task inspection item number, extract first detection data from the first user data, perform inspection processing on the first detection data, and obtain a task inspection result corresponding to the task inspection item; Based on the task inspection result, the first data matching result is obtained.
5. A method for generating a business process based on a contract as claimed in claim 1, characterized in that: The acquired target contract image is subjected to content recognition processing to obtain a plurality of contract titles and contract title contents corresponding to the plurality of contract titles, specifically including: Inputting the acquired target contract image into a pre-trained image segmentation model, so that the image segmentation model determines the bounding box coordinates corresponding to each contract title in the target image, and based on the bounding box coordinates, segmenting the target contract image to obtain a plurality of contract title images and contract title content images corresponding to each of the plurality of contract title images; Performing text recognition on the multiple contract title images based on a text recognition algorithm to obtain multiple first contract titles, and screening the multiple first contract titles based on a preset standard contract title set to obtain multiple screened contract titles; Based on a text recognition algorithm, text recognition is performed on the contract title content images corresponding to each of the multiple contract titles to obtain the contract title contents corresponding to each of the multiple contract titles.
6. A method for generating a business process based on a contract as claimed in claim 1, characterized in that: Based on the content of the contract title, determining the first execution time and the first execution content specifically includes: Obtaining a standard contract template, wherein the standard contract template includes content keywords corresponding to each standard contract title content; Matching the contract title content with all standard contract title contents in the standard contract template to obtain target standard contract content, and obtaining target content keywords corresponding to the target standard contract content; Acquire the keyword quantity of the target content keyword, and when the keyword quantity is 1, use the contract title content as the first execution content of the contract title corresponding to the contract title content; Based on a preset time regular expression, character matching processing is performed on the first execution content to obtain a first execution time of the contract title corresponding to the contract title content; When the number of the keywords is greater than 1, the target content keyword is used as the sub-contract title of the contract title corresponding to the contract title content, and the contract title content is subjected to content classification processing based on the sub-contract title to obtain the sub-contract title content corresponding to each sub-contract title, and all sub-contract title contents are integrated to obtain the first execution content of the contract title corresponding to the contract title content; Based on the preset time regular expression, character matching processing is performed on the content of each sub-contract title to obtain the first sub-execution time corresponding to the sub-contract title content, and all first sub-execution times are integrated to obtain the first execution time of the contract title corresponding to the contract title content.
7. A method for generating a business process based on a contract as claimed in claim 6, characterized in that: Based on the first execution time, the plurality of contract titles are sorted to generate a contract title sequence, specifically including: Acquire the first execution time corresponding to each of the plurality of contract titles, and sort the plurality of contract titles based on the sequence of the first execution times to obtain a first contract title sequence; Traversing each contract title in the first contract title sequence, when detecting that the sub-contract title exists in the target contract title, obtaining the target first sub-execution time of the target sub-contract title content corresponding to the target sub-contract title, and arranging the target sub-contract titles based on the sequence of the target first sub-execution time to obtain the target sub-contract title sequence of the target contract title; The target sub-contract title in the first contract title sequence is updated to a target sub-contract title sequence to obtain a contract title sequence.
8. A business process generation device based on a contract, characterized in that: include: Image recognition module, process node sequence generation module, process node storage module, data matching module and process node update module; The image recognition module is used to perform content recognition processing on the acquired target contract image to obtain multiple contract titles and contract title contents corresponding to each of the multiple contract titles, and determine the first execution time and the first execution content based on the contract title contents; The process node sequence generation module is used to sort the multiple contract titles based on the first execution time to generate a contract title sequence, convert the contract title sequence into a process node sequence, and use the first execution content as a process node task corresponding to each process node in the process node sequence; The process node storage module is used to store the process node sequence and the process node task corresponding to each process node in the process node sequence into a target database; The data matching module is used to obtain first user data input by the user in the first dialogue interface, call the target model to convert the first user data into a first user question, and perform data matching processing on the target database based on the first user question to obtain a first data matching result; The process node updating module is used to store the first user data in the target database and update the process node execution status corresponding to each process node in the process node sequence when the first data matching result is a successful data matching.
9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for generating a contract-based business process as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the contract-based business process generation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Nuclear power design task management system and method and storage medium
CN110705036A
Contract process management method and device
CN111915277A
Service process generation method and device, electronic equipment and medium
CN113887941A
Contract attachment management method and equipment based on business process, and medium
CN117252547A
Label generation for element of business process model
US20220092352A1