A method for legal regulation scraping and contract auditing based on multi-agent cooperation

CN122550112APending Publication Date: 2026-08-11XIAMEN YUANSHEN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-28
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]本发明的目的在于提供一种基于多智能体协同的法律法规抓取与合同审核方法用于解决现有智能审核架构协同性差、任务调度不合理,且故障处置易中断流程、资源损耗大,审核精度与运行稳定性不足的问题

Benefits of technology

1、本发明提供一种基于多智能体协同的法律法规抓取与合同审核方法,通过三类智能体,依托加权时间片轮询模式动态调整任务优先级与运行时隙,各智能体依托消息总线异步协作、各司其职,有序完成法规采集、文本解析、合规校验、风险评级全流程作业,打破一体式架构作业局限,有效提升大批量合同整体审核处理效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122550112A_ABST
    Figure CN122550112A_ABST
Patent Text Reader

Abstract

This invention discloses a method for legal and regulatory data collection and contract review based on multi-agent collaboration, comprising the following steps: S1, receiving a contract review request containing the text of the contract to be reviewed; S2, constructing a multi-agent collaborative architecture including a scheduling agent, a legal data collection agent, and a contract review agent; S3, the scheduling agent coordinates the overall task distribution and system resource scheduling, the legal data collection agent completes the collection, standardization, and construction of a legal and regulatory knowledge base from multiple sources, and the contract review agent performs semantic analysis of the contract text to be reviewed and extracts key contract elements; S4, employing a multi-level matching and verification mechanism, comparing and verifying the key contract elements with the legal clauses in the legal and regulatory knowledge base; S5, based on the matching and verification results, completing a quantitative rating of contract compliance risk, locating and marking non-compliant clauses, and outputting the contract review results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, specifically to a method for legal and regulatory data capture and contract review based on multi-agent collaboration. Background Technology

[0002] In the context of a normalized market economy, the scale of various civil and commercial activities, such as trade, engineering cooperation, and labor contracts, continues to expand, resulting in a sustained increase in the volume of contracts generated daily. As a core document defining rights and responsibilities, binding performance, and preventing legal disputes, the compliance review of contract terms directly relates to transaction security and the legitimate rights and interests of all parties. Therefore, contract review is an indispensable and crucial task in commercial operations.

[0003] Early contract review relied entirely on legal personnel manually reviewing and comparing each clause. This was not only slow and costly, but also susceptible to the influence of individual professional experience, making it difficult to standardize decisions and hindering large-scale processing of massive amounts of contract documents. With the popularization of artificial intelligence and big data technologies, intelligent review methods are gradually replacing traditional manual methods and becoming the mainstream application in the industry.

[0004] Most current intelligent contract review systems on the market adopt a monolithic processing architecture, lacking a modular division of labor and collaboration mechanism. This makes it impossible to coordinate various tasks such as regulatory updates, text parsing, clause comparison, and risk assessment. The rigid task scheduling methods result in poor accuracy in element recognition and legal provision matching. Furthermore, when system failures such as timeouts, data loss, or matching anomalies occur, the conventional approach is to restart the entire process. This not only consumes significant computing resources but also interrupts the review process, severely impacting the continuity and reliability of the review results, and failing to meet the actual needs of efficient and stable review of large volumes of contracts. Summary of the Invention

[0005] The purpose of this invention is to provide a method for legal and regulatory data capture and contract review based on multi-agent collaboration to solve the problems of poor collaboration, unreasonable task scheduling, easy interruption of process due to fault handling, large resource consumption, and insufficient review accuracy and operational stability in the existing intelligent review architecture. To achieve the above objectives, the present invention adopts the following technical solution: A method for legal regulation capture and contract review based on multi-agent collaboration includes the following steps: S1. Receive a contract review request containing the contract text to be reviewed; S2. Construct a multi-agent collaborative architecture that includes a scheduling agent, a regulatory capture agent, and a contract review agent; S3. Each intelligent agent achieves asynchronous communication and decoupled collaboration through an event-driven message bus. The scheduling intelligent agent coordinates the distribution of tasks across the entire domain and the scheduling of system resources. The legal capture intelligent agent completes the collection, standardization, and construction of legal knowledge bases from multiple sources of legal data. The contract review intelligent agent performs semantic analysis of the text of the contract to be reviewed and extracts key elements of the contract. S4. A multi-level matching and verification mechanism is adopted to compare and verify the key elements of the contract with the legal provisions in the legal knowledge base. S5. Based on the matching and verification results, complete the quantitative rating of contract compliance risks, locate and mark non-compliant clauses, and output the contract review results.

[0006] Preferably, in step S3, the scheduling agent adjusts task priority weights based on real-time load and business review requirements, and allocates runtime slots to each agent using a weighted time-slice round-robin method. The calculation formula for time slot allocation is as follows:

[0007] in, To preset the base time slice duration, The total number of intelligent agents participating in coordinated scheduling. This is the target agent sequence number for the current time slot to be allocated. The summation traversal index is used to iterate through all collaborative agents; For the first The task priority weights corresponding to each target agent. For the first The task priority weights corresponding to the participating scheduling agents. To be assigned to the The actual runtime of each intelligent agent; Preferably, the process of multi-source legal and regulatory data collection and processing performed by the legal and regulatory data-grabbing intelligent agent in step S3 includes: Configure access frequency, request interval and IP proxy polling parameters for each legal source site, and build an anti-crawling protection system in combination with the site fingerprint verification mechanism; The raw web page data obtained through crawling is processed by filtering dirty data, deduplicating content, repairing garbled characters, and normalizing images and text legal provisions. The newly collected regulatory data is compared with historical data in the knowledge base to determine the content differences. An improved Jaccard difference index is used to identify the regulatory update status. The difference index calculation formula is as follows:

[0008] in, To account for the differences in the content of regulatory data, This is the latest collected regulatory dataset. The historical regulatory dataset stored in the knowledge base The number of elements in the intersection of the old and new regulatory datasets. The number of elements in the union of the old and new regulations datasets; Set update threshold ,when When it is determined that there are new additions, revisions, or repeals to the regulations, an incremental update of the legal knowledge base is triggered. The processed regulatory data is tagged in multiple dimensions according to legal category, publication time, and validity status, and then indexed and stored in a distributed manner.

[0009] Preferably, the process of semantic analysis of the contract review agent in step S3 includes: The document analyzes the contract text to be reviewed by performing sentence segmentation, legal terminology segmentation, part-of-speech tagging, and syntactic dependency parsing. Based on a pre-set dictionary of legal stop words and a thesaurus of synonyms, redundant semantic units are filtered out, and core legal vocabulary is retained. The selected core feature words are mapped to a legal domain word vector matrix, which serves as the input basis for subsequent key element identification and semantic matching.

[0010] Preferably, in step S3, the contract review agent uses a named entity recognition model fine-tuned with a legal contract domain-specific corpus to extract key contract elements. The named entity recognition model uses a legal domain-specific corpus for parameter fine-tuning, and a category-weighted cross-entropy loss function is introduced during training for convergence constraints. The expression for the cross-entropy loss function is:

[0011] in, The value of the loss function. The total number of training samples, For the number of legal entity categories, For category weighting coefficients, For real labels, Predict probabilities for the model.

[0012] Preferably, the multi-level matching and verification mechanism in step S4 specifically includes: First, use the keyword inverted index to search the legal knowledge base and obtain the corresponding set of candidate legal provisions; Then, based on the weights of legal feature dimensions, cosine similarity is calculated and compared with a preset matching threshold to filter compliant legal provisions. The cosine similarity calculation formula is as follows:

[0013] in, For semantic matching degree, These are the feature word vectors corresponding to the key elements of the contract. These are the feature word vectors corresponding to the legal provisions. The total number of feature dimensions. For the first Weighting coefficients of legal characteristics , These represent the feature values ​​of the corresponding word vectors in each dimension.

[0014] Preferably, the matching and verification process in step S4 also includes verification of rigid legal norms. A legal rule library containing mandatory provisions, prohibitive norms and optional norms is pre-built. For the key elements of the extracted contract, the performance period, compensation standards, jurisdiction agreement and exemption clauses are checked item by item. If the content of the contract clause violates the mandatory provisions or prohibitive norms, the clause is directly marked as a high-risk clause.

[0015] Preferably, step S5 specifically involves: conducting a quantitative rating of contract compliance risk based on the matching verification results, simultaneously locating and marking non-compliant clauses and outputting the contract review results. The rating process employs a compliance risk quantification model, combining semantic matching degree, the number of non-compliant clauses, and the legal validity status to calculate risk values. Risk levels are then categorized according to the value range, and the causes and legal basis of the risks are indicated. The formula for calculating the risk value is:

[0016] in, This represents the contract compliance risk value. The average semantic match between contract elements and legal provisions. For the number of violations, As a factor affecting the expiration of regulations, , , These are the weighting coefficients for each indicator.

[0017] Preferably, the method further includes step S6: performing a confidence check on the contract review results output in step S5, and constructing a confidence evaluation function based on semantic matching degree and compliance risk value. The calculation formula for the confidence evaluation function is as follows:

[0018] in, To assess the confidence level of the audit results, , These are the weighting coefficients for the corresponding indicators; The confidence score is compared with the preset threshold. If the confidence score does not meet the standard, the model and matching parameters are adjusted, and the feature extraction, legal provision matching and risk rating processes are re-executed.

[0019] Preferably, during the collaborative execution of tasks by each intelligent agent in steps S3-S5, real-time operational status monitoring is performed on each stage of regulatory data capture, element extraction, semantic matching, and risk rating. When any intelligent agent experiences a task timeout, data loss, or matching anomaly, the scheduling intelligent agent blocks the current abnormal task link and retrieves the pre-cached data corresponding to each process, triggering a single-step partial rollback operation. Only the abnormal process is re-executed for data processing and algorithm calculation, while retaining the execution results of the remaining normal processes.

[0020] By adopting the above technical solution, the present invention has the following advantages compared with the prior art: 1. This invention provides a method for legal and regulatory data collection and contract review based on multi-agent collaboration. Through three types of agents, the method dynamically adjusts task priorities and runtime slots based on a weighted time slice polling mode. Each agent collaborates asynchronously through a message bus and performs its own duties to complete the entire process of legal data collection, text parsing, compliance verification, and risk rating in an orderly manner. This breaks the limitations of the integrated architecture and effectively improves the overall efficiency of reviewing and processing large batches of contracts.

[0021] 2. This invention provides a method for legal and regulatory data collection and contract review based on multi-agent collaboration. By configuring site access parameters and fingerprint verification to build a secure collection mechanism, the original legal and regulatory data is cleaned and organized. The Jaccard difference algorithm is used to determine the status of legal and regulatory changes and automatically completes incremental updates of the knowledge base. This method can continuously maintain the integrity and timeliness of the legal and regulatory database and provide a reliable and up-to-date reference for subsequent compliance comparison of contract terms.

[0022] 3. This invention provides a method for legal and regulatory data extraction and contract review based on multi-agent collaboration. It optimizes the word segmentation and parsing process for legal text characteristics and uses a named entity recognition model trained on a dedicated corpus to extract key contract elements. It successively conducts keyword coarse screening, cosine similarity fine matching, and special verification of rigid legal norms to screen out illegal clauses in contracts at multiple levels and in all aspects, effectively reducing element identification bias and the probability of missed detection, and significantly improving the accuracy of compliance judgment.

[0023] 4. This invention provides a method for legal and regulatory data collection and contract review based on multi-agent collaboration. It calculates compliance risk values ​​by comprehensively considering multiple dimensions such as semantic matching degree, number of non-compliant clauses, and timeliness of regulations, accurately classifies risk levels, and marks the reasons for violations and legal basis. An additional confidence verification step for the review results is added. Based on the confidence judgment results, the model and matching parameters are optimized in reverse to achieve closed-loop correction of the review results and ensure that the final review conclusion is rigorous and reliable.

[0024] 5. This invention provides a method for legal and regulatory data capture and contract review based on multi-agent collaboration. It monitors the operation status of each process in real time throughout the entire process. When an operational failure occurs, only the abnormal process is rolled back and recalculated, while the calculation results of the other normal processes are retained. There is no need to restart the entire review process, which reduces unnecessary consumption of computing resources and avoids interruption of the review process, effectively enhancing the system's continuous operation capability and operational stability. Attached Figure Description

[0025] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Example

[0027] Please refer to Figure 1 As shown, this invention discloses a method for legal regulation capture and contract review based on multi-agent collaboration, including the following steps: S1. Receive a contract review request containing the text of the contract to be reviewed. The front-end business system and the enterprise legal management platform can initiate a contract review request to the back-end service through an interface. The request message includes the complete original text of the contract to be reviewed, the contract type label, the industry identifier, and the review priority identifier. The system will uniformly access and complete the legality verification and message parsing of the request, and then proceed to the subsequent intelligent review process.

[0028] S2. Construct a multi-agent collaborative architecture that includes a scheduling agent, a regulatory capture agent, and a contract review agent, and deploy the multi-agent architecture in a distributed microservice cluster environment.

[0029] The three types of intelligent agents are each independently encapsulated as microservice nodes, deployed decoupled from each other, and horizontally elastically scaled. The scheduling intelligent agent serves as the global central node, responsible for task queuing, load monitoring, and resource quota allocation. The legal crawling intelligent agent is dedicated to crawling and managing data from multiple sources such as government legal websites and industry standard platforms. The contract review intelligent agent focuses on contract text parsing, element extraction, compliance comparison, and risk assessment. All three types of intelligent agents are uniformly registered in the service registry center to achieve service discovery and dynamic invocation.

[0030] S3. Each agent uses a message middleware to build an event-driven message bus. Each agent interacts asynchronously with messages in a publish / subscribe mode. Task distribution, status reporting, anomaly alarms, and process flow are all pushed in the form of event messages to avoid synchronous call blocking and achieve decoupled collaboration in high-concurrency scenarios. The scheduling agent collects load data such as CPU, memory, and task queue backlog of each agent in real time, and dynamically assigns different task priorities based on the urgency of the business to ensure that high-priority contract review tasks are scheduled and executed first. The legal data collection agent polls various legal source stations 24 / 7 and continuously iterates and updates the legal knowledge base. The contract review agent batches in the text of contracts to be reviewed, and the pipeline completes text preprocessing, semantic parsing, and key entity extraction to provide structured element data for subsequent compliance verification.

[0031] In step S3, the scheduling agent adjusts the task priority weights based on real-time load and business review requirements, and allocates runtime slots to each agent using a weighted time-slice round-robin method. The calculation formula for time slot allocation is as follows:

[0032] in, To preset the base time slice duration, The total number of intelligent agents participating in coordinated scheduling. This is the target agent sequence number for the current time slot to be allocated. The summation traversal index is used to iterate through all collaborative agents; For the first The task priority weights corresponding to each target agent. For the first The task priority weights corresponding to the participating scheduling agents. To be assigned to the The actual runtime of each intelligent agent; In practice The system dynamically and adaptively adjusts its allocation based on node load and idle time, as well as the urgency level of business audits. The higher the load and the lower the urgency level, the lower the weight and the smaller the allocated runtime slots. Conversely, the slot quota is increased to achieve dynamic and balanced resource allocation on demand.

[0033] Step S3, the process of the legal data acquisition agent performing multi-source legal data collection and processing, includes: Configure access frequency, request interval and IP proxy polling parameters for each legal source site, and build an anti-crawling protection system in combination with the site fingerprint verification mechanism; The raw web page data obtained through crawling is processed by filtering dirty data, deduplicating content, repairing garbled characters, and normalizing images and text legal provisions. The newly collected regulatory data is compared with historical data in the knowledge base to determine the content differences. An improved Jaccard difference index is used to identify the regulatory update status. The difference index calculation formula is as follows:

[0034] Where Δ represents the degree of difference in regulatory data content, This is the latest collected regulatory dataset. The historical regulatory dataset stored in the knowledge base The number of elements in the intersection of the old and new regulatory datasets. The number of elements in the union of the old and new regulations datasets; Set update threshold ,when When it is determined that there are new additions, revisions, or repeals to the regulations, an incremental update of the legal knowledge base is triggered. The processed regulatory data is tagged in multiple dimensions according to legal category, publication time, and validity status, and then indexed and stored in a distributed manner.

[0035] In this embodiment, a dedicated crawler strategy is configured for each legal source website, and access blocking is avoided through IP proxy pool polling; advertising tags, invalid placeholder content, and garbled characters are removed from the original web pages, and image-formatted legal provisions are converted into standard text format through OCR recognition to achieve image-text legal provisions normalization; a threshold is set. The value can be in the range of 0.15 to 0.3, and can be adaptively configured according to the update frequency of different regulations. The normalized regulatory data uses Elasticsearch to build an inverted index, and is stored in a distributed database with sharding and table partitioning to support high concurrency and fast retrieval.

[0036] Step S3, the process of semantic analysis of the contract review agent on the contract text to be reviewed, includes: The document analyzes the contract text to be reviewed by performing sentence segmentation, legal terminology segmentation, part-of-speech tagging, and syntactic dependency parsing. Based on a pre-set dictionary of legal stop words and a thesaurus of synonyms, redundant semantic units are filtered out, and core legal vocabulary is retained. The selected core feature words are mapped to a legal domain word vector matrix, which serves as the input basis for subsequent key element identification and semantic matching.

[0037] For contracts in different industries such as engineering, labor, sales and purchase, and services, a built-in customized legal word segmentation dictionary is used to adapt to the segmentation of professional legal terms. By removing modal particles, connecting words, and meaningless modifiers through a stop word dictionary, and then relying on a legal thesaurus for semantic normalization, legal words with different expressions of the same meaning are mapped to a unified feature space. Finally, a fixed-dimensional legal word vector matrix is ​​generated to provide standardized input for named entity recognition and semantic similarity calculation.

[0038] In step S3, the contract review agent uses a named entity recognition model fine-tuned with a corpus specific to the legal contract domain to extract key contract elements. The named entity recognition model uses a corpus specific to the legal domain for parameter fine-tuning, and a category-weighted cross-entropy loss function is introduced during training for convergence constraints. The expression for the cross-entropy loss function is as follows:

[0039] in, The value of the loss function. The total number of training samples, For the number of legal entity categories, For category weighting coefficients, For real labels, Predict probabilities for the model.

[0040] This process selects a massive amount of real contract texts and legal documents to construct a legal contract-specific corpus, and performs domain-specific incremental fine-tuning on the general pre-trained language model; it sets higher weighting coefficients for important entity categories such as contract subjects, performance clauses, liability for breach of contract, and dispute resolution to alleviate the problem of imbalanced category samples and improve the accuracy and recall rate of identifying high-risk key entities.

[0041] S4. A multi-level matching and verification mechanism is adopted to compare and verify the key elements of the contract with the legal provisions in the legal knowledge base. The multi-level matching and verification mechanism in step S4 is as follows: First, use the keyword inverted index to search the legal knowledge base and obtain the corresponding set of candidate legal provisions; Then, based on the weights of legal feature dimensions, cosine similarity is calculated and compared with a preset matching threshold to filter compliant legal provisions. The cosine similarity calculation formula is as follows:

[0042] in, For semantic matching degree, These are the feature word vectors corresponding to the key elements of the contract. These are the feature word vectors corresponding to the legal provisions. The total number of feature dimensions. For the first Weighting coefficients of legal characteristics , These represent the feature values ​​of the corresponding word vectors in each dimension.

[0043] The process first uses keyword screening to quickly recall highly relevant candidate legal provisions, narrowing the comparison scope; then it introduces legal feature dimension weights, giving higher weights to highly sensitive dimensions such as performance period, compensation standards, and jurisdiction agreements to optimize semantic matching accuracy; and sets a fixed semantic matching threshold, retaining only legal provisions that meet the matching degree for subsequent compliance assessment, balancing retrieval efficiency and matching accuracy.

[0044] The matching and verification process in step S4 also includes the verification of rigid legal norms. A legal rule library containing mandatory provisions, prohibitive norms and optional norms is pre-built. For the key elements of the extracted contract, the performance period, compensation standards, jurisdiction agreement and exemption clauses are checked item by item. If the content of the contract clause violates the mandatory provisions or prohibitive norms, the clause is directly marked as a high-risk clause.

[0045] The mandatory provisions concerning validity, mandatory provisions concerning administration, and prohibitions in existing laws are separately tagged and stored in a rigid regulatory rule library. Each key element of a contract is checked against the rules one by one. If any clauses cross the legal red line, exempt from legal liability, or evade mandatory obligations, they are directly marked as high risk and the record is locked, unaffected by semantic matching results, thus solidifying the bottom line of compliance.

[0046] S5. Based on the matching and verification results, complete the quantitative rating of contract compliance risks, locate and mark non-compliant clauses, and output the contract review results.

[0047] Step S5 specifically involves: conducting a quantitative assessment of contract compliance risks based on the matching and verification results, simultaneously identifying and marking non-compliant clauses, and outputting the contract review results. The assessment process employs a compliance risk quantification model, combining semantic matching degree, the number of non-compliant clauses, and the current status of regulations to calculate risk values. Risk levels are then categorized according to the value range, and the causes and legal basis of the risks are indicated. The risk value calculation formula is as follows:

[0048] in, This represents the contract compliance risk value. The average semantic match between contract elements and legal provisions. For the number of violations, As a factor affecting the expiration of regulations, , , These are the weighting coefficients for each indicator.

[0049] This embodiment classifies risk values ​​into four levels: low risk, medium risk, relatively high risk, and high risk, and automatically classifies them according to the threshold range of the numerical values. At the same time, it associates each non-compliant clause with the corresponding legal item, the reason for the violation, and the compliance modification suggestions, and outputs a structured audit report, which is convenient for legal personnel to directly review and rectify.

[0050] S6. Conduct a confidence check on the contract review results output in step S5. Construct a confidence evaluation function based on semantic matching degree and compliance risk value. The calculation formula for the confidence evaluation function is as follows:

[0051] in, To assess the confidence level of the audit results, , These are the weighting coefficients for the corresponding indicators; The confidence score is compared with a preset threshold. If the confidence score is insufficient, the model and matching parameters are adjusted, and the element extraction, legal provision matching, and risk rating processes are re-executed. This embodiment sets a confidence score threshold range. If the score is lower than the threshold, the credibility of the current review result is deemed insufficient, automatically triggering parameter fine-tuning and partial re-review, forming a closed-loop iterative mechanism to continuously improve the stability and reliability of the review.

[0052] During the collaborative execution of tasks by each intelligent agent in steps S3-S5, real-time operational status monitoring is performed on each stage of regulatory data capture, element extraction, semantic matching, and risk rating. When any intelligent agent experiences a task timeout, data loss, or matching anomaly, the scheduling agent blocks the current abnormal task link and retrieves the pre-cached data corresponding to each process, triggering a single-step partial rollback operation. Only the abnormal process is re-executed for data processing and algorithm calculation, while the execution results of the remaining normal processes are retained.

[0053] Each processing step is configured with a timeout threshold, data integrity verification rules, and anomaly alarm mechanism. The system has a built-in distributed cache that persistently caches intermediate results for each step. In case of an anomaly, there is no need to restart the entire process from the beginning. Instead, the system rolls back to the starting node of the abnormal process, reuses the results of the previously completed processes, and completes the task by recalculating locally. This significantly saves computing power, shortens review time, and improves the system's fault tolerance and continuous operation capabilities in high-concurrency scenarios.

[0054] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for legal regulation scraping and contract auditing based on multi-agent collaboration, characterized in that, Includes the following steps: S1. Receive a contract review request containing the contract text to be reviewed; S2. Construct a multi-agent collaborative architecture that includes a scheduling agent, a regulatory capture agent, and a contract review agent; S3. Each intelligent agent achieves asynchronous communication and decoupled collaboration through an event-driven message bus. The scheduling intelligent agent coordinates the distribution of tasks across the entire domain and the scheduling of system resources. The legal capture intelligent agent completes the collection, standardization, and construction of legal knowledge bases from multiple sources of legal data. The contract review intelligent agent performs semantic analysis of the text of the contract to be reviewed and extracts key elements of the contract. S4. A multi-level matching and verification mechanism is adopted to compare and verify the key elements of the contract with the legal provisions in the legal knowledge base. S5. Based on the matching and verification results, complete the quantitative rating of contract compliance risks, locate and mark non-compliant clauses, and output the contract review results.

2. The method for legal regulation capture and contract review based on multi-agent collaboration as described in claim 1, characterized in that: In step S3, the scheduling agent adjusts task priority weights based on real-time load and business review requirements, and allocates runtime slots to each agent using a weighted time-slice round-robin method. The calculation formula for time slot allocation is as follows: in, To preset the base time slice duration, The total number of intelligent agents participating in coordinated scheduling. This is the target agent sequence number for the current time slot to be allocated. The summation traversal index is used to iterate through all collaborative agents; For the first The task priority weights corresponding to each target agent. For the first The task priority weights corresponding to the participating scheduling agents. To be assigned to the The actual runtime of each intelligent agent.

3. The method of claim 1, wherein the method is based on multi-agent collaboration. The process of multi-source legal and regulatory data collection and processing by the legal and regulatory data-grabbing intelligent agent in step S3 includes: Configure access frequency, request interval and IP proxy polling parameters for each legal source site, and build an anti-crawling protection system in combination with the site fingerprint verification mechanism; The raw web page data obtained through crawling is processed by filtering dirty data, deduplicating content, repairing garbled characters, and normalizing images and text legal provisions. The newly collected regulatory data is compared with historical data in the knowledge base to determine the content differences. An improved Jaccard difference index is used to identify the regulatory update status. The difference index calculation formula is as follows: Wherein, Δ is the regulation data content difference degree, is the latest collected regulation data set, is the historical regulation data set stored in the knowledge base, is the intersection element number of the new and old regulation data sets, is the union element number of the new and old regulation data sets; Setting update discrimination threshold When , it is determined that there is a new, revised or abolished change in the regulations, triggering the incremental update of the legal regulation knowledge base; The processed regulatory data is tagged in multiple dimensions according to legal category, publication time, and validity status, and then indexed and stored in a distributed manner.

4. The method of claim 1, wherein the method is based on multi-agent collaboration. The process of semantic analysis of the contract review agent in step S3 includes: The document analyzes the contract text to be reviewed by performing sentence segmentation, legal terminology segmentation, part-of-speech tagging, and syntactic dependency parsing. Based on a pre-set dictionary of legal stop words and a thesaurus of synonyms, redundant semantic units are filtered out, and core legal vocabulary is retained. The selected core feature words are mapped to a legal domain word vector matrix, which serves as the input basis for subsequent key element identification and semantic matching.

5. The method of claim 1, wherein the method is based on multi-agent collaboration. In step S3, the contract review agent uses a named entity recognition model fine-tuned with a legal contract domain-specific corpus to extract key contract elements. This named entity recognition model uses a legal domain-specific corpus for parameter fine-tuning, and a category-weighted cross-entropy loss function is introduced during training for convergence constraints. The expression for the cross-entropy loss function is: in, The value of the loss function. The total number of training samples, For the number of legal entity categories, For category weighting coefficients, For real labels, Predict probabilities for the model.

6. The method for legal regulation capture and contract review based on multi-agent collaboration as described in claim 1, characterized in that: The multi-level matching and verification mechanism mentioned in step S4 is as follows: First, use the keyword inverted index to search the legal knowledge base and obtain the corresponding set of candidate legal provisions; Then, based on the weights of legal feature dimensions, cosine similarity is calculated and compared with a preset matching threshold to filter compliant legal provisions. The cosine similarity calculation formula is as follows: in, For semantic matching degree, These are the feature word vectors corresponding to the key elements of the contract. These are the feature word vectors corresponding to the legal provisions. The total number of feature dimensions. For the first Weighting coefficients of legal characteristics , These represent the feature values ​​of the corresponding word vectors in each dimension.

7. The method of claim 1, wherein the method is based on multi-agent collaboration. The matching and verification process in step S4 also includes the verification of rigid legal norms. A legal rule library containing mandatory provisions, prohibitive norms and optional norms is pre-built. For the key elements of the extracted contract, the performance period, compensation standards, jurisdiction agreement and exemption clauses are checked item by item. If the content of the contract clause violates the mandatory provisions or prohibitive norms, the clause is directly marked as a high-risk clause.

8. The method of claim 1, wherein the method is based on multi-agent collaboration. Step S5 specifically involves: conducting a quantitative assessment of contract compliance risks based on the matching and verification results, simultaneously locating and marking non-compliant clauses, and outputting the contract review results. The assessment process employs a compliance risk quantification model, combining semantic matching degree, the number of non-compliant clauses, and the current status of regulations to calculate risk values. Risk levels are then categorized according to the value range, and the causes and legal basis of the risks are indicated. The formula for calculating the risk value is: in, This represents the contract compliance risk value. The average semantic match between contract elements and legal provisions. For the number of violations, As a factor affecting the expiration of regulations, , , These are the weighting coefficients for each indicator.

9. The method of claim 8, wherein the method is based on multi-agent collaboration. It also includes step S6, which involves performing a confidence check on the contract review results output in step S5, and constructing a confidence evaluation function based on semantic matching degree and compliance risk value. The calculation formula for the confidence evaluation function is as follows: wherein, is the audit result confidence, , is the corresponding index weight coefficient; The confidence score is compared with the preset threshold. If the confidence score does not meet the standard, the model and matching parameters are adjusted, and the feature extraction, legal provision matching and risk rating processes are re-executed.

10. The method of claim 1, wherein the method is based on multi-agent collaboration. During the collaborative execution of tasks by each intelligent agent in steps S3-S5, real-time operational status monitoring is performed on each stage of regulatory data capture, element extraction, semantic matching, and risk rating. When any intelligent agent experiences a task timeout, data loss, or matching anomaly, the scheduling agent blocks the current abnormal task link and retrieves the pre-cached data corresponding to each process, triggering a single-step partial rollback operation. Only the abnormal process is re-executed for data processing and algorithm calculation, while the execution results of the remaining normal processes are retained.