A regulation analysis processing method and device, a storage medium and an electronic device
By parsing entity relationships and mapping multimodal tags in legal texts, a legal knowledge graph is constructed. Combined with a large language model, the problems of low efficiency in legal text parsing and coarse tag granularity are solved, achieving efficient and accurate legal text parsing and question answering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING ANT CONSUMER FINANCE CO LTD
- Filing Date
- 2025-12-19
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies suffer from low efficiency in parsing legal texts, high maintenance costs, coarse-grained legal tags, difficulty in handling complex legal logical connections, and a lack of contextual reasoning capabilities.
By acquiring legal text information and parsing entity relationships, a structured data unit for laws and regulations is constructed. Multimodal tag mapping technology is used to generate a legal knowledge graph, which is then combined with a large language model for dialogue processing to facilitate user interaction.
It achieves efficient and structured parsing of legal texts, provides accurate legal text analysis and Q&A, improves parsing efficiency and accuracy, and integrates static accuracy, dynamic adaptability and the characteristics of judicial practice risks.
Smart Images

Figure CN121365662B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a regulatory analysis processing method, apparatus, storage medium, and electronic device. Background Technology
[0002] In related technologies, there is a need to process massive amounts of legal documents, regulatory policies, and internal corporate policy documents. These documents are typically in unstructured formats such as PDFs and Word documents, and their content is often obscure and logically complex for non-legal professionals. Currently, the parsing and compliance review of such documents mainly rely on human expert annotation or rule engines. This approach suffers from limitations such as low efficiency, high maintenance costs, and coarse-grained regulatory tags. Summary of the Invention
[0003] This specification provides a regulatory parsing processing method, apparatus, storage medium, and electronic device, which can overcome the limitations of related technologies such as low efficiency, high maintenance costs, and coarse regulatory label granularity. It can at least improve the processing efficiency and accuracy of regulatory parsing. The technical solution is as follows:
[0004] Firstly, embodiments of this specification provide a regulatory analysis processing method, the method comprising:
[0005] Multiple reference legal texts are obtained, and entity relationship parsing and transformation are performed on the reference legal texts to obtain multiple legal structured data units. The legal structured data units include legal entities, clause content, and logical relationships between clauses.
[0006] Determine the basic attribute classification labels, legal semantic labels, and legal practice risk labels for the legal structured data unit. Based on the basic attribute classification labels, legal semantic labels, and legal practice risk labels, perform multimodal label mapping on the legal structured data unit to obtain the legal structured data unit carrying multimodal fusion labels.
[0007] Based on the structured data units of the regulations and the multimodal fusion tags, a regulatory knowledge graph is constructed for the text information of the reference regulations, so as to perform user dialogue response processing based on the regulatory knowledge graph through a dialogue processing large language model.
[0008] Secondly, embodiments of this specification provide a regulatory analysis processing apparatus, the apparatus comprising:
[0009] The parsing and conversion module is used to obtain multiple reference legal text information, and to perform entity relationship parsing and conversion on the reference legal text information to obtain multiple legal structured data units. The legal structured data units include legal entities, clause content and logical relationships between clauses.
[0010] The tag mapping module is used to determine the basic attribute classification tag, legal semantic tag, and legal practice risk tag for the legal structured data unit, and to perform multimodal tag mapping on the legal structured data unit based on the basic attribute classification tag, legal semantic tag, and legal practice risk tag to obtain the legal structured data unit carrying a multimodal fusion tag.
[0011] The regulatory processing module is used to construct a regulatory knowledge graph for the reference regulatory text information based on the regulatory structured data unit and the multimodal fusion tag, so as to perform user dialogue response processing on the reference regulations based on the regulatory knowledge graph through a dialogue processing large language model.
[0012] Thirdly, embodiments of this specification provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.
[0013] Fourthly, embodiments of this specification provide an electronic device that may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the above-described method steps.
[0014] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:
[0015] In one or more embodiments of this specification, the electronic device obtains multiple structured data units of regulations by parsing and transforming the entity relationship of the referenced regulatory text information. It then employs a multimodal tag mapping method that integrates the basic attribute classification tags, semantic tags, and practical risk tags of the structured regulatory data units to obtain structured data units carrying multimodal fusion tags. Furthermore, it constructs a regulatory knowledge graph for the referenced regulatory text information. Finally, based on the constructed regulatory knowledge graph and a large language model for dialogue processing, it performs interactive processing. This addresses the technical limitations of low efficiency in parsing unstructured legal texts, logical fragmentation caused by mechanical segmentation, coarse tag granularity lacking a practical perspective, and the inability of traditional retrieval technologies to handle complex legal logical connections and lack of contextual reasoning ability. This achieves the transformation of heterogeneous and chaotic original regulatory texts into semantically complete structured data containing clear logical relationships. It also integrates high-dimensional multimodal tags that combine static accuracy, dynamic adaptability, and judicial practice risk characteristics. Consequently, it can accurately understand user intent through the graph-assisted large model, providing intelligent legal text parsing and question-and-answer effects with professional compliance interpretation. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating a regulatory analysis method provided in the embodiments of this specification;
[0018] Figure 2 This is a schematic diagram of a multimodal tag mapping process provided in the embodiments of this specification;
[0019] Figure 3 This is a schematic diagram of a user dialogue response processing method provided in the embodiments of this specification;
[0020] Figure 4 This is a schematic diagram of a process for constructing a regulatory knowledge graph provided in the embodiments of this specification;
[0021] Figure 5 This is a schematic diagram of the structure of a regulatory analysis processing device provided in the embodiments of this specification;
[0022] Figure 6 This is a schematic diagram of the structure of an electronic device provided in the embodiments of this specification. Detailed Implementation
[0023] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0024] In the description of this specification, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In the description of this specification, it should be noted that, unless otherwise expressly specified and limited, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. Those skilled in the art can understand the specific meaning of the above terms in this specification based on the specific circumstances. Furthermore, in the description of this specification, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0025] The present specification will now be described in detail with reference to specific embodiments.
[0026] In one embodiment, such as Figure 1 As shown, a regulatory parsing and processing method is proposed. This method can be implemented using a computer program and can run on a regulatory parsing and processing device based on the von Neumann architecture. This computer program can be integrated into applications or run as a standalone utility application. The regulatory parsing and processing device can be an electronic device, including but not limited to: personal computers, tablets, service platform devices, in-vehicle devices, computing devices, or other processing devices connected to a wireless modem. Terminal devices can have different names in different networks, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user equipment, cellular phone, cordless phone, electronic device in 5G networks or future evolved networks, etc.
[0027] Specifically, the methods for interpreting and processing this regulation include:
[0028] S102: Obtain multiple reference legal text information, and perform entity relationship parsing and transformation on the reference legal text information to obtain multiple legal structured data units. The legal structured data units include legal entities, clause content, and logical relationships between clauses.
[0029] Referenced regulatory text information can be understood as the original legal documents that users come into contact with. The format of referenced regulatory text information is mainly unstructured, such as PDF, Word, HTML, and TXT. Referenced regulatory text information includes national laws and regulations, industry regulatory provisions, judicial interpretations, and corporate internal management systems (such as employee handbooks and compliance guidelines).
[0030] Legal structured data units can be understood as standardized data objects (such as JSON objects, XML nodes, database records, and other structured data) generated after entity relationship parsing and transformation. A legal structured data unit is data containing structured fields at the smallest independent semantic logic granularity (e.g., a legal clause or independent paragraph).
[0031] For example, a structured data unit of a regulation obtained by referring to the text information of the regulation is shown below:
[0032] Clause number: Article 5,
[0033] Legal entities: [Company A, employees]
[0034] Obligations: Employees must abide by confidentiality agreements.
[0035] Related clause: [Article 8 (Liability for Breach of Contract)],
[0036] Effective Date: 2025-01-01
[0037] In one feasible implementation, the document's hierarchical structure is extracted using optical character recognition and layout analysis algorithms. The document is then physically segmented based on explicit delimiters such as chapter numbers and clause numbers to obtain segmented text. Dependency parsing is performed on the segmented text to construct a syntax tree. A pre-defined legal logic template library (such as subject-verb-object structure templates and conditional clause templates) is used to match the syntax tree to obtain a target legal logic template. Subjects (such as legal entities), predicates (such as rights / obligations), and objects (such as objects) are extracted according to the target legal logic template. Logical connectors are mapped to logical relationship types between clauses (such as citation relationships and exclusion relationships). After mapping all available template slots in the target legal logic template, one or more structured data units corresponding to the referenced legal text information are obtained.
[0038] In one feasible implementation, the entity relationship parsing and transformation of the referenced regulatory text information is specifically performed to obtain multiple regulatory structured data units. These regulatory structured data units include legal entities, clause content, and logical relationships between clauses, and can be implemented in the following manner:
[0039] Step S2: Filter out non-regulatory text noise characters from the referenced regulatory text information, and perform semantic logical unit segmentation on the filtered referenced regulatory text information based on a pre-trained semantic sentence segmentation model to obtain multiple clause text fragments.
[0040] Non-legal text noise characters can be understood as interfering information that does not belong to the substantive content of the legal provisions. This includes, but is not limited to, headers, footers, page numbers, page watermarks, garbled characters generated by scanning, and decorative symbols unrelated to the logic of the provisions.
[0041] The pre-trained semantic segmentation model is a natural language processing model with contextual semantic awareness, pre-trained on a large-scale corpus, such as semantic segmentation models using architectures like BERT and RoBERTa. This pre-trained semantic segmentation model can identify the complete boundaries of legal clauses based on the semantic coherence of the text. Its output is: the filtered reference legal text information.
[0042] In a schematic manner, a pre-defined regular expression is used to scan the reference regulatory text information, matching and removing noisy characters that are not part of the regulatory text, resulting in a clean text stream. This clean text stream is then input into a BERT-based semantic segmentation model. The semantic segmentation model treats the segmentation task as a character classification task, identifying whether each character belongs to the beginning or end of a clause, and determining the natural boundaries of the clauses based on contextual semantics, thereby outputting multiple segmented clause text fragments.
[0043] Step S4: Perform entity recognition on the text fragment of the clause to obtain legal entities including legal subjects, obligees and key time limits, and extract the logical relationship of rights and obligations between the legal subjects and the obligees as the logical relationship between the clauses;
[0044] Key time-limiting elements refer to the time constraints specified in the clauses, such as the effective date, within thirty days, or two consecutive years.
[0045] The logical relationship between rights and obligations refers to the logical binding relationship between legal entities and the objects of obligations;
[0046] In a schematic manner, entity recognition and relationship extraction prompts are constructed for clause text fragments. The clause text fragments and "entity recognition and relationship extraction prompts" are input into a legal domain processing model that has been fine-tuned using legal domain knowledge to perform entity recognition. This results in legal entities including legal subjects, obligees, and key time-limited elements. The logical relationship between the rights and obligations of the legal subjects and the obligees is extracted as the logical relationship between clauses.
[0047] Step S6: The number index of the clause text fragment, the legal entity, and the logical relationship between the clauses are processed into a structured data unit of the regulations.
[0048] For example, a pre-defined document object model can be used for serialization encapsulation, such as a predefined standard JSON Schema model, which includes metadata fields (id, source, version), content fields (content), and semantic parsing fields (entities, logic_relations).
[0049] Then, the number index of the clause text fragment, the legal entity, and the logical relationship between the clauses are mapped and filled using a preset document object model. For example, the clause text fragment is filled into the content field, the number index is parsed and filled into the id field, the legal entity and the obligee are filled into the entities array, and the logical relationship between rights and obligations is converted into a nested object and filled into the logic_relations array.
[0050] The assembled memory object is serialized into a legally structured data unit in binary or text format.
[0051] This specification addresses several technical challenges by filtering noise from reference legal texts during data preprocessing, employing semantic logic unit segmentation based on pre-trained models, and extracting logical relationships of rights and obligations down to the entity level. These challenges include: significant parsing interference due to messy formats in legal texts; the tendency of traditional mechanical segmentation methods to sever the semantic integrity of clauses; and the inability to analyze the deep normative logic between legal subjects and obligated parties by extracting only surface keywords. This approach achieves the acquisition of clause text fragments with clear semantic boundaries and logical integrity, transforming unstructured legal texts into standardized structured data units containing precise legal entities and clear logical relationships of rights and obligations. This lays the semantic data foundation for subsequent multimodal label mapping and high-precision knowledge graph construction.
[0052] S104: Determine the basic attribute classification label, legal semantic label, and legal practice risk label for the legal structured data unit; perform multimodal label mapping on the legal structured data unit based on the basic attribute classification label, legal semantic label, and legal practice risk label to obtain the legal structured data unit carrying a multimodal fusion label.
[0053] Basic attribute classification tags are static attribute identifiers that categorize regulatory texts based on legal rules or industry standards. Examples include industry sector (e.g., finance, healthcare), level of legal force (e.g., laws, administrative regulations, departmental rules), and geographical scope of application (e.g., groups, parts, branches, conglomerates).
[0054] Legal semantic tags refer to semantic descriptive tags generated by using natural language processing technology to semantically analyze the implicit semantics, business constraints, and potential legal concepts in the text of regulations. Legal semantic tags can be simply understood as tags that can represent the deeper semantic meaning beyond the literal meaning of the text (for example, parsing "not allowed to..." as a non-compete tag).
[0055] Regulatory practice risk labels can be understood as derived practice risk labels parsed from structured data units of regulations through practice data sources (such as judicial precedents and administrative penalty records). These labels can be used to quantify the practical risk characteristics of a regulatory provision in actual judicial practice, regulatory enforcement, etc., and can include metrics such as dispute frequency, loss rate, or compliance threshold level.
[0056] In one feasible implementation, from the perspective of basic attributes, a text embedding model is used to convert the clause text corresponding to the structured data unit of regulations into a text semantic vector. The cosine similarity between this text semantic vector and a preset industry classification center vector is calculated, and one or more attribute categories corresponding to the center vector with the highest similarity are determined as basic attribute classification labels. From the perspective of regulatory semantics, a preset Large Language Model (LLM) is used to construct semantic parsing prompts through prompt engineering, and then the structured data unit of regulations is subjected to clause semantic parsing to identify the implicit semantics, business constraints, and potential legal concepts of the clause text. Thus, regulatory semantic labels are generated based on the implicit semantics, business constraints, and potential legal concepts of the clause text. From the perspective of practice, a legal risk indicator map constructed in the pre-review is used to match the reference map nodes corresponding to the structured data unit of regulations in the legal risk indicator map. Then, the node information and node relationship information of the reference map nodes are obtained, and regulatory practice risk features are extracted based on the node information and node relationship information to construct regulatory practice risk labels.
[0057] The generated basic attribute classification tags, legal semantic tags, and legal practice risk tags are encapsulated to obtain tag objects, which are then written into the extended fields of the legal structured data unit in the form of key-value pairs to complete the multimodal tag mapping.
[0058] Example: Suppose that the clause of a certain structured data unit of a regulation states: Within two years after leaving the company, an employee shall not work for other employers that produce or operate similar products or engage in similar businesses that are in competition with the original employer.
[0059] The labeling results obtained by performing the above steps are as follows:
[0060] Basic attribute category tags: Labor Law, Human Resource Management.
[0061] Legal semantic tags: The pre-set large language model analyzes the semantics of the text, identifies that the clause falls under the category of non-compete, and generates tags: non-compete, prohibition of competition with peers, and obligations after leaving the company.
[0062] Legal Practice Risk Tags: Using a legal risk indicator map, relevant reference nodes are searched. The node information and node relationship information of the reference nodes indicate that there are a large number of labor dispute cases involving the relevant legal provisions, and the agreements are often invalid due to unclear compensation agreements. Therefore, tags such as "high-frequency disputed clauses" and "high risk in judicial practice" are generated.
[0063] Finally, all the above tags are encapsulated and written into the extended field of the regulatory structured data unit to complete the multimodal tag mapping.
[0064] S106: Construct a regulatory knowledge graph for the reference regulatory text information based on the regulatory structured data unit and the multimodal fusion tag, so as to perform user dialogue response processing on the reference regulations based on the regulatory knowledge graph through a dialogue processing large language model.
[0065] The large language model for dialogue processing can be a general-purpose large language model (LLM), which includes, but is not limited to, large-scale pre-trained models built on Transformer architecture, Hybrid Expert Model (MoE) architecture, or State Space Model (SSM) architecture, such as the GPT series of large models, the Qianwen series of large models, the DeepSeek series of large models, etc.; or it can be a generative artificial intelligence model fine-tuned by using legal domain instructions to interpret legal regulations. This dialogue processing large language model has the capabilities of intent recognition, complex logical reasoning, and natural language generation, and can understand the user's natural language input to generate responses that conform to legal professional norms.
[0066] The legal knowledge graph is associated with a legal knowledge graph index. The legal knowledge graph is a structured semantic network of laws and regulations constructed using knowledge graph construction technology. The nodes of the legal knowledge graph are the structured data units of laws and regulations from previous steps, and the edges correspond to explicit references or implicit logical connections between clauses. Multimodal fusion tags are attached to the nodes as attribute data.
[0067] To illustrate, the construction of a regulatory knowledge graph begins by instantiating structured data units of regulations carrying multimodal fusion tags as graph nodes. Explicit reference edges are established by parsing the reference keywords in the clause content of the structured data units of regulations. Implicit association edges are established by calculating the semantic vector similarity between pairs of nodes or based on node association tags (such as both containing non-compete clauses). After completing the construction of nodes and edges for all structured data units of regulations, the regulatory knowledge graph is obtained. Finally, an index for the regulatory knowledge graph is constructed based on the multimodal tags of each graph node in the regulatory knowledge graph.
[0068] After completing the construction of the legal knowledge graph, in subsequent practical applications, electronic devices receive legal query requests input by users, parse the legal query requests (e.g., by directly using a dialogue processing large language model), extract key query entities and filtering conditions, and then generate structured graph query instructions. Using the structured graph query instructions, the core node that is hit is quickly located in the index of the legal knowledge graph. Based on the core node, a preset graph traversal algorithm is sampled to expand outward along the edge of the node to recall the query local knowledge subgraph of neighboring nodes that have direct reference relationships and semantic association relationships with the core node (such as superior legal basis, related judicial interpretations). The clause text, tag information and relationship descriptions in the local knowledge subgraph are serialized into graph-enhanced query context.
[0069] Then, a set of legal query suggestions, including graph-enhanced query context and user query input, is constructed. Based on the legal query suggestions, a dialogue processing large language model is driven to generate the final response. The response content may include, for example, direct answers, legal citations, and risk warnings.
[0070] In the embodiments of this specification, the electronic device obtains multiple structured data units of regulations by parsing and transforming the entity relationship information of the referenced regulatory text. It then uses a multimodal tag mapping method that integrates the basic attribute classification tags, semantic tags, and practical risk tags of the regulatory structured data units to obtain regulatory structured data units carrying multimodal fusion tags. Finally, it constructs a regulatory knowledge graph for the referenced regulatory text information. Based on the constructed regulatory knowledge graph, it performs interactive processing in conjunction with a large language model for dialogue processing. This solves the technical limitations of low efficiency in parsing unstructured legal texts, logical fragmentation caused by mechanical segmentation, coarse tag granularity and lack of practical perspective, and the inability of traditional retrieval technologies to handle complex legal logical connections and lack of contextual reasoning ability. Thus, it realizes the transformation of heterogeneous and messy original regulatory texts into semantically complete structured data containing clear logical relationships. It also integrates high-dimensional multimodal tags that combine static accuracy, dynamic adaptability, and judicial practice risk characteristics. In this way, it can accurately understand user intentions through the graph-assisted large model and provide intelligent legal text parsing and question-and-answer effects with professional compliance interpretation.
[0071] Optional, please see Figure 2 , Figure 2 This is a schematic diagram of a multimodal label mapping process proposed in this specification. Specifically, the process involves determining the basic attribute classification labels, legal semantic labels, and legal practice risk labels for the legal structured data unit. Based on these labels, the process performs multimodal label mapping on the legal structured data unit to obtain the legal structured data unit carrying a multimodal fusion label. This can be achieved using the following method:
[0072] S202: For the structured data unit of regulations, perform static regulation attribute parsing based on a preset legal rule base to obtain basic attribute classification labels, perform text semantic parsing based on a pre-trained target large language model to obtain regulation semantic labels, and perform regulation practice association parsing based on a preset external regulation practice data source to obtain regulation practice risk labels.
[0073] The preset legal rule base can be configured to store a database containing common classification standards, hierarchical systems, and keyword mapping relationships in the legal industry, based on actual application scenarios.
[0074] In this specification, static regulatory attribute analysis refers to the process of making a deterministic classification based solely on explicit features in the text (such as keywords, regulatory names, and issuing agencies) without relying on deep semantic context.
[0075] The analysis of the correlation between regulations and practice in this manual can be understood as the process of establishing a correlation between static clause texts and dynamic external judicial practice data (such as precedents, penalties, and public opinion) and extracting risk characteristics.
[0076] In one feasible implementation, the clause text in the structured data unit of regulations is converted into clause text embedding vectors. The Euclidean distance between the clause text embedding vectors and the standard classification center vectors in the preset legal rule base is calculated, and the legal rule category with the closest distance is used as the basic attribute classification label. Target prompt words containing role setting information, regulatory semantic task description information, and output normative information are constructed. The clause text and target prompt words are input into a preset target large language model (LLM). The target large language model identifies the implicit business constraints in the text and outputs regulatory semantic labels. The citation index of the clause is extracted as the query key, and an SQL aggregation query is executed in a preset external regulatory practice data source (such as the China Judgments Online mirror database). Based on the query data results, the citation frequency and loss rate over the past year are statistically analyzed. A comprehensive risk score is obtained by weighting and summarizing the citation frequency and loss rate, and the comprehensive risk score is converted into a regulatory practice risk label.
[0077] In one feasible implementation, the specific execution of the structured legal data unit involves: performing static legal attribute parsing based on a preset legal rule base to obtain basic attribute classification labels; performing text semantic parsing based on a pre-trained target large language model to obtain legal semantic labels; and performing legal practice association parsing based on a preset external legal practice data source to obtain legal practice risk labels. This can be achieved through the following methods:
[0078] Step A2: Extract the clause content keywords corresponding to the structured data unit of the regulations, match the clause content keywords with the industry classification rules and legal type rules in the preset legal rule base, and when the clause content keywords match the target rule in the preset legal rule base, determine the target regulation attribute tag corresponding to the target rule as the basic attribute classification tag for the structured data unit of the regulations.
[0079] In a demonstrative manner, the term frequency-inverse document frequency (TF-IDF) algorithm is used to calculate the word weights of the clause text content of the structured data unit of the regulations. The words with the highest word weights are extracted as the keywords of the clause content from high to low. The clause content keywords are traversed, and the clause content keywords are matched with the key-value pairs corresponding to the industry classification rules and legal type rules in the preset legal rule base. If a keyword matches a rule entry in the rule base, the tag corresponding to the rule entry is used as the basic attribute classification tag.
[0080] Step A4: Input the structured data unit of regulations and the basic attribute classification label into the target large language model, and use semantic parsing task prompts to instruct the target large language model to identify and output potential regulatory concepts and business constraints. Extract regulatory semantic labels for the structured data unit of regulations based on the potential regulatory concepts and business constraints.
[0081] Semantic parsing task prompts refer to the prompt words filled in the template slots using preset prompt word templates. These prompt words are used to guide the large language model in performing legal semantic analysis tasks. For example, please analyze the following clauses and extract their compliance obligations and applicable scenarios.
[0082] Implicit legal concepts refer to technical terms that are not explicitly stated in the text but are implied based on legal logic. For example, a clause stating "must not be disclosed to third parties" implies a confidentiality obligation.
[0083] In a schematic way, basic attribute classification labels are used as background context, and the clause content of the structured data unit of regulations is used as the data to be analyzed. These are concatenated into the prompt word template to obtain the semantic parsing task prompt. The semantic parsing task prompt includes a pre-set semantic parsing thought chain. The structured data unit of regulations and the basic attribute classification labels are input into the target large language model. The semantic parsing task prompt instructs the target large language model to identify and output potential regulatory concepts and business constraints according to the semantic parsing thought chain. Key phrases are extracted from the potential regulatory concepts and business constraints using a preset regular expression as regulatory semantic tags.
[0084] Step A6: Using the clause number or clause content in the structured data unit of regulations as a reference anchor, retrieve the judicial case data and regulatory penalty update records associated with the reference anchor in the preset external regulatory practice data source, determine the practical risk indicator characteristics corresponding to the structured data unit of regulations based on the judicial case data and regulatory penalty update records, and generate a regulatory practice risk label for the structured data unit of regulations based on the practical risk indicator characteristics.
[0085] Reference anchors refer to key values used to establish relationships between heterogeneous databases.
[0086] Practical risk indicators refer to risk statistical indicators extracted from pre-defined external legal and practical data sources. Examples include the number of related cases, the rate of losing cases, the average amount of fines, and trends in citation popularity.
[0087] Regulatory practice risk labels refer to qualitative descriptive labels mapped from the characteristics of practical risk indicators, such as high-frequency disputes and high fines.
[0088] In a schematic manner, using the clause number or clause content in the structured data unit of the regulations as a reference anchor, an SQL aggregation query statement is constructed. Using the reference anchor as a foreign key, a precise matching retrieval is performed in a preset external legal practice data source to retrieve judicial case data and regulatory penalty update records associated with the reference anchor.
[0089] Statistical analysis was performed on the retrieved data to calculate the following practical risk indicator characteristics:
[0090] Citation frequency: The total number of cases that cite this clause within a specific period (e.g., 12 months).
[0091] Adversarial indicators: In judicial cases, calculate the proportion of cases in which the company is the defendant and loses (loss rate); in administrative penalties, calculate the average or median penalty amount.
[0092] A pre-defined risk grading threshold table is used (e.g., citation frequency > 100 is high-frequency, adversarial index > 50% is high-risk). The calculated practical risk indicator characteristics are compared with the threshold table, and a legal practice risk label is generated for the structured data unit of the regulations based on the comparison results. For example, if the citation frequency of a certain clause is in the high range and the adversarial index exceeds the warning line, a combined label of "high-frequency dispute, pre-defeat, high risk" is generated as the legal practice risk label.
[0093] S204: Based on the basic attribute classification label, the legal semantic label, and the legal practice risk label, the legal structured data unit is subjected to label mapping processing to obtain the legal structured data unit carrying a multimodal fusion label.
[0094] In one feasible implementation, a multimodal attribute field is added to the original regulatory structured data unit, and the basic attribute classification label, regulatory semantic label and regulatory practice risk label are mapped to the sub-attribute values under this field, respectively. The expanded regulatory structured data unit is then re-serialized to generate a regulatory structured data unit.
[0095] In one feasible implementation, a text embedding model is used to convert basic attribute classification labels, regulatory semantic labels, and practical risk labels into basic classification feature vectors, regulatory semantic feature vectors, and practical risk feature vectors, respectively. The three vectors are then fused with the clause text vectors corresponding to the original clause text of the regulatory structured data unit using vector concatenation or weighted averaging to generate a comprehensive feature vector. This comprehensive feature vector is then written into the vector field of the regulatory structured data unit. This method allows the regulatory structured data unit to be directly used for downstream vector similarity retrieval.
[0096] In the embodiments of this specification, a hybrid processing method is adopted for the structured data units of regulations, which combines static attribute parsing based on a preset rule base, dynamic legal semantic parsing based on a pre-trained large model, and risk association parsing based on external practical data. Furthermore, a multimodal label fusion mapping of basic classification, legal semantics, and practical risk features is performed. This achieves the generation of high-dimensional multimodal fusion labels that have industry classification certainty, deep semantic adaptability, and judicial practice risk warning capabilities. Static legal provisions are transformed into structured data objects carrying rich practical data, thereby improving the semantic granularity and risk insight of legal text parsing.
[0097] Optional, please see Figure 3 , Figure 3 This is a flowchart illustrating a user dialogue response processing method proposed in this specification. Specifically, the process of handling user dialogue responses based on the legal knowledge graph using a large dialogue processing language model can be implemented in the following manner:
[0098] S302: Responding to a user's reference regulation query request input into the dialogue processing large language model regarding reference regulations;
[0099] In a schematic manner, a user submits a reference regulation inquiry request in natural language to the dialogue processing big language model through a human-computer interaction interface (such as a chat window or API interface) to obtain regulatory needs such as legal consultation, clause interpretation, compliance comparison and risk assessment. At this time, the electronic device receives the reference regulation inquiry request and initiates a response, executing S304.
[0100] S304: Parse the reference regulation query request into a structured graph query command;
[0101] Structured graph query command: Transforms the natural language intent corresponding to the reference regulation query request into a logical expression that can be executed using a knowledge graph database. The logical expression is used for context data search before enhanced context construction.
[0102] In a demonstrative manner, the core intent of the user is identified by parsing the request for reference to regulations, and key slot information in the preset structured graph query template is extracted. The user's core intent and key slot information are then filled into the preset structured graph query template and encapsulated to generate a structured graph query instruction.
[0103] S306: Based on the structured graph query command, locate the target node in the legal knowledge graph, and query the node clause content information and node multimodal fusion tags of the target node and its extended related nodes, and construct an enhanced context based on the node clause content information and node multimodal fusion tags;
[0104] The target node refers to the graph node that meets the filtering conditions of the structured graph query command, which is usually a specific legal clause node.
[0105] Extended related nodes refer to other nodes in the graph topology that are connected to the target node by a specific path. Extended related nodes include higher-level legal nodes (reference basis), lower-level institutional nodes (affected objects), related case nodes (practical evidence), and synonym nodes.
[0106] Enhanced context is used to assist large models in generating rich semantic information packages for the final response. Enhanced context not only includes the original text of the clauses, but also introduces static attributes, regulatory semantics and practical risk labels, as well as auxiliary information from related nodes.
[0107] In one feasible implementation, based on the preset context parsing task prompt words, the target node is located in the legal knowledge graph by referring to the structured graph query instructions through the dialogue processing large language model. Starting from each target node, the graph expands outward along a predefined edge type by K hops (K is usually a custom value). The text attributes and tag attributes of all traversed nodes are extracted and assembled into a local knowledge subgraph including logical relationships. The enhanced context is obtained by generating a knowledge graph description based on the local knowledge subgraph.
[0108] In one feasible implementation, the structured graph query instruction is executed to locate the target node in the regulatory knowledge graph, and the node clause content information and node multimodal fusion tags of the target node and its extended associated nodes are queried. An enhanced context is then constructed based on the node clause content information and node multimodal fusion tags, which can be done in the following manner:
[0109] Step C2: Based on the tag filtering conditions in the structured graph query instruction, locate the target node in the node tag index corresponding to the legal knowledge graph, and recall extended related nodes that have a reference relationship or semantic dependency relationship with the target node in the legal knowledge graph along the logical relationship between the target clauses of the target node;
[0110] Citation relationships refer to the explicit legal citation logic in legal texts, which is represented as directed edges in a graph. For example, an edge that points from a subordinate law designated by the "XX Law" to a superior law, or a same-level jump edge that refers to Article N.
[0111] Semantic dependency relationships refer to connections that are strongly related in legal logic or business substance but are not explicitly cited. For example, the relationship between the penalties stipulated in two different laws for the same behavior and the judicial cases that interpret those provisions.
[0112] Extended associated nodes refer to neighboring nodes in the graph topology that are directly connected (1 hop) or indirectly connected (k hops, not equal to 1) to the target node through the aforementioned logical relationship edges.
[0113] In a schematic manner, the query clause in the structured graph query command is parsed, the inverted index in the node label index is accessed, and a list of all node IDs containing that label is obtained. This list is then used as the initial target node set. For each target node in the set, a breadth-first search (BFS) process is performed on the graph database. All edges originating from the target node are filtered and identified, with edges selected based on reference association or semantic dependency association types. The process then jumps along the selected edges to adjacent nodes, marking them as extended association nodes. Optionally, a maximum number of hops can be set to prevent excessively large recalls from causing noise.
[0114] This paper illustrates how the semantic description in a structured graph query command is parsed, a semantic description query vector is constructed based on the semantic description, and the similarity between the query vector and the graph node vector is calculated using the vector index in the access node label index. The Top-K nodes are selected as target nodes. A random walk algorithm is then used, starting from the target nodes and performing a probability walk based on the edge weights, collecting neighboring nodes with access frequencies greater than a threshold as extended associated nodes.
[0115] Step C4: (This can be done through the large language model of the dialogue processing) Integrate the node clause content information and node multimodal fusion tags of the target node and the extended associated nodes to construct an enhanced context.
[0116] The integration process can be the process of splicing, deduplicating, summarizing, and rewriting discrete graph node data (including text, attributes, and tags) according to a preset logical order and format specifications, so as to transform them into a natural language text stream.
[0117] Enhance the contextual input to the reference information portion of the Prompt in the large language model for dialogue processing.
[0118] Indicatively, the enhanced context can be obtained by integrating the node clause content information of the target node and the extended associated nodes, as well as the node multimodal fusion tags, using a preset context template filling method for structured construction.
[0119] In this specification, the target node is accurately located in the node tag index based on the tag filtering conditions in the structured graph query command. Then, the graph traversal is performed along the logical relationship between clauses to recall extended related nodes with reference association or semantic dependency. Subsequently, the clause content of the above nodes and multimodal fusion tags are integrated through the dialogue processing large language model to construct an enhanced context. This realizes the knowledge recall from single clauses to reference chains and practical evidence by utilizing the topological structure of the knowledge graph. By integrating multimodal tags, a semantically rich enhanced context is constructed, ensuring that the final generated regulatory response has high legal logical integrity, accurate source tracing, and practical risk warning capabilities.
[0120] S308: Control the dialogue processing large language model to generate a legal inquiry response based on the reference legal inquiry request and the enhanced context, and obtain the user's legal inquiry response.
[0121] In one feasible implementation, user legal inquiry processing prompts are constructed according to a preset prompt template. During the construction of user legal inquiry processing prompts, the model role is set as a senior legal compliance advisor, and legal inquiry processing constraint instructions are injected, such as: explicitly requiring answers to be strictly based on the provided reference input materials, strictly prohibiting the fabrication of legal provisions, and requiring source indexes to be marked after each statement. The user's input reference legal inquiry request and enhanced context are concatenated according to the preset prompt template, the set model role, and the legal inquiry processing constraint instructions to form the final input user legal inquiry processing prompts. The preset prompt template specifies a preset prompt thought chain.
[0122] Input the user's legal inquiry prompts into the dialogue processing language model, and control the dialogue processing language model to execute the task of generating legal inquiry responses according to the preset prompt thinking chain. The model summarizes the original text of the legal provisions in the context and automatically associates the source ID during the generation process, and finally outputs the user's legal inquiry response.
[0123] For example, the preset prompt thinking chain can be customized as follows: 1) Fact-finding thinking steps: Extract key facts from the user's question. 2) Rule application thinking steps: Match the content of the clauses in the context. 3) Risk deduction thinking steps: Combine legal practice risk tags to deduce the possible legal consequences (such as "may lead to the invalidity of the agreement"). 4) Suggestion synthesis: Generate specific compliance operation suggestions based on the above deductions.
[0124] For example, the following is a user inquiry scenario:
[0125] The legal inquiry is as follows: If a non-compete agreement does not specify compensation, is the agreement valid?
[0126] Enhanced context includes: Article xx of the Labor Contract Law (label: high-frequency dispute), judicial interpretation (which stipulates that failure to stipulate compensation may lead to termination rights), and related cases (a company lost a case due to failure to pay compensation).
[0127] Execute S302-S308:
[0128] The large model generated the following responses to user regulatory inquiries:
[0129] Conclusion: The agreement carries extremely high legal risks, and the employee has the right to request the termination of the non-compete agreement.
[0130] Legal basis: According to Article xx of the "xx" [Source: Judicial Interpretation Node], if the employer has not agreed on economic compensation, the employee has the right to demand payment after fulfilling his / her obligations; if payment is not made for three months, the employee may request to terminate the agreement.
[0131] Practical Risk Warning: The system has detected that this clause is a frequently disputed point. In practice, the complete absence of a compensation clause is often seen by courts as depriving workers of their legitimate rights, which can easily lead to the company losing the case (see case: XX).
[0132] Recommendation: It is recommended to sign a supplementary agreement immediately, clearly stipulating that economic compensation of no less than 30% of wages will be paid monthly.
[0133] This specification utilizes a dialogue processing large language model to parse users' natural language queries into machine-executable structured graph query instructions. Then, based on a legal knowledge graph, it performs target node location and expanded related node traversal retrieval. Finally, it generates a response based on an enhanced context control model containing node clause content and multimodal fusion tags. This achieves the transformation of users' ambiguous natural language intentions into precise graph operation logic, utilizes the graph topology to realize chain-like knowledge retrieval, and constructs a rich semantic context by combining the multimodal tags carried by nodes. This ensures that the final generated legal query response possesses extremely high legal accuracy, logical completeness, and practical risk warning capabilities.
[0134] Optional, please see Figure 4 , Figure 4 This is a flowchart illustrating a regulatory knowledge graph construction process proposed in this specification. Specifically, it describes the construction of a regulatory knowledge graph based on the structured regulatory data units and the multimodal fusion tags, targeting the reference regulatory text information. The process includes:
[0135] S402: Initiate the construction of a chronological regulatory knowledge graph;
[0136] A temporal legal knowledge graph is an evolutionary graph that introduces a time dimension into the traditional knowledge graph. The nodes and edges of a temporal legal knowledge graph have time attributes, which can express the changes in the status of laws and regulations over time, such as revision, repeal, and effectiveness.
[0137] S404: Map the structured data unit of the regulations to a graph node, and associate time dimension information with the graph node. The time dimension information includes the publication time, effective time, expiration time and version number. Establish node relationship edges for the graph node based on the logical relationship between the clauses.
[0138] Specifically, after starting the construction of the time-series legal knowledge graph, the node mapping operation is first performed. The legal structured data units generated in the previous steps are instantiated as graph nodes in the graph database. For example, the unique identifier in the data unit is extracted as the primary key of the node, and the clause text content and basic metadata are written into the attribute fields of the node, thereby completing the physical transformation of the data object into a graph entity.
[0139] Building upon this, additional time-related dimension information is introduced for this graph node. This time-related dimension information specifically includes the publication date, effective date, expiration date, and version number. For example, the specific date of the regulation's publication is written into the node's publication date attribute, the start and end dates of the legal effect are written into the effective date and expiration date attributes respectively, and the revision number of the clause is written into the version number attribute. If the current clause is currently in effect, the expiration date attribute can be set to a default infinity value or a null value.
[0140] Furthermore, based on the logical relationships between clauses, node relationship edges are established for the nodes of the graph. By parsing the logically related data extracted in advance from the data units, the abstract logical connections are transformed into directed edges connecting two nodes in the graph. For example, when the logical relationship indicates that the current clause references another superior law, a reference relationship edge is created from the current node to the target superior law node; when the logical relationship indicates that the current clause is a revision of the previous version clause, an evolution relationship edge is created from the old version node to the new version node, thereby constructing a time-series legal knowledge graph with a rigorous logical topology.
[0141] In one feasible implementation, specifically performing the step of establishing node relationship edges for the graph nodes based on the logical relationships between the clauses includes:
[0142] Step D2: Establish explicit reference edges for the graph nodes based on the logical relationships between the clauses;
[0143] An explicit reference edge is a connecting edge in a graph used to indicate that there is a clear textual reference relationship between legal texts. In practice, explicit reference edges are clearly written in the text by the legislator or the drafter of the document, such as "This provision is formulated in accordance with the XX Law" or "See Article N".
[0144] The logical relationship between clauses refers to the directional related data parsed from unstructured text, such as the basis of higher-level laws, citations at the same level, and repealed objects.
[0145] Specifically, the logical relationship data between clauses extracted from the structured data units of the regulations is analyzed to identify the relationship types that represent explicit references (e.g., formulated in accordance with Law XX, see Article N, violates the provisions of this law), and the name of the target regulation and the specific clause number are extracted from the relationship type data as the target index;
[0146] Next, locate the current graph node in the graph database as the source node, and use the target index to retrieve the corresponding target graph node;
[0147] If the target node exists, create a directional explicit reference edge between the two nodes and mark the type of the edge, such as as reference, basis, or penalty basis.
[0148] If the target node has not yet been established in the current graph library (e.g., it references an external law that has not yet been included), a placeholder node with a unique identifier is automatically created as a temporary target node and a connection is established. This ensures the complete mapping of explicit legal reference relationships and the connectivity of the graph topology, truly restoring the strict hierarchical dependencies and reference logic in the legal system.
[0149] Step D4: Calculate the business semantic distance between each pair of graph nodes and determine the potential associated nodes corresponding to the graph nodes based on the business semantic distance;
[0150] Specifically, the node pairs in the graph are traversed to randomly select candidate node pairs, extract the clause text content and multimodal fusion tags of each graph node, and then the aforementioned information of each graph node is concatenated and transformed into a high-dimensional semantic vector representing the deep business meaning through vector engineering. Then, the vector distance between the corresponding vectors of two nodes (such as calculating the cosine similarity distance or Euclidean distance) is calculated to quantify the degree of difference between the two in terms of legal concepts, applicable scenarios and compliance substance, which is used as the business semantic distance. The smaller the distance value, the closer the business logic is.
[0151] Furthermore, the calculated business semantic distance is compared with the preset association judgment threshold. When the business semantic distance between two nodes is less than the association judgment threshold, it is determined that although there is no explicit reference text in the text, the two graph nodes are strongly related in business logic. Then, the corresponding target node is identified as the potential associated node of the current graph node.
[0152] Step D6: Based on the potential associated nodes corresponding to the graph nodes, establish implicit dependency edges representing the potential logical subordinate relationships between clauses.
[0153] The potential logical subordination between clauses can be understood as follows: between two legal clauses, there is no explicit textual reference (e.g., the text does not state that it is formulated in accordance with XX law or see Article N), but there is a de facto dependence or binding relationship at the level of business substance, legal concepts, and compliance obligations.
[0154] In a schematic way, for each identified potential related node, an edge entity creation operation is performed in the temporal legal knowledge graph to establish a connection between the current graph node and the potential related node, and the type attribute of the connection is marked as an implicit dependency edge or a semantic subordinate edge to distinguish it from explicit reference relationships based on text literal meaning.
[0155] In this process, the calculated business semantic distance or similarity value is written as a weight attribute into the implicit dependency edge to quantify the tightness of the potential logical subordination relationship between clauses. Optionally, for node pairs involving different legal levels (such as corporate systems and national laws), the directionality of the dependency edge can be determined according to the preset hierarchy rules, that is, a unidirectional dependency path is constructed from the low-level institutional node to the high-level regulatory node, thereby constructing an implicit logical subordination network in the graph that can reflect the substantive business constraints and is independent of explicit textual references. This provides key topological path support for subsequent compliance risk transmission and effectiveness impact analysis based on graph traversal.
[0156] S406: Based on the multimodal fusion tags and the graph nodes, establish a node tag index corresponding to the legal knowledge graph.
[0157] The node label index is an auxiliary data query index built on a time-series legal knowledge graph, which can solve the performance bottleneck of full-graph scanning in graph databases when faced with massive numbers of nodes. This index establishes a fast mapping relationship from multimodal fusion labels (feature space) to unique identifiers (ID space) of graph nodes. In practical applications, this allows for locating legal clause nodes with specific business characteristics first, rather than directly performing a full-scale search and match.
[0158] This diagram illustrates how to traverse each node in a time-series legal knowledge graph, extracting multimodal fusion label data (including basic classification, legal semantics, and practical risk dimensions) from the node information corresponding to each node. This multimodal fusion label data is then parsed into independent index keys. A mapping mechanism from the label feature space to the graph node identifier space is established. This can be achieved, for example, by constructing a multi-level inverted index, creating an inverted list containing unique identifiers of all graph nodes possessing that label for each independent label value. Alternatively, a vector index based on vector similarity retrieval can be constructed by embedding multimodal labels into a text input vector within the model.
[0159] Furthermore, to support rapid search and filtering based on time-series dimensions, the time-series information of graph nodes (such as effective and expiration times) can be appended as metadata to the index entries when establishing the index mapping relationship. This forms a hybrid node tag index that integrates semantic tag features and time-series lifecycle attributes. This ensures that when electronic devices process compliant queries that include complex tag filtering conditions and time slicing requirements, they can directly locate the target node set by accessing this node tag index without performing an inefficient full-graph scan operation, thereby improving the graph's retrieval response speed and concurrent processing capabilities.
[0160] The following will combine Figure 5 This specification provides a detailed description of the regulatory analysis processing apparatus provided in the embodiments. It should be noted that... Figure 5The regulatory analysis and processing device shown is used to execute this specification. Figures 1-4 The methods shown in the embodiments are illustrated for ease of explanation, showing only the parts related to the embodiments of this specification. For specific technical details not disclosed, please refer to this specification. Figures 1-4 The example shown.
[0161] Please see Figure 5 This diagram illustrates the structure of a regulatory parsing and processing device according to an embodiment of this specification. This regulatory parsing and processing device 1 can be implemented as all or part of a user terminal through software, hardware, or a combination of both. According to some embodiments, the regulatory parsing and processing device 1 includes a parsing and conversion module 11, a tag mapping module 12, and a regulatory processing module 13, specifically used for:
[0162] The parsing and conversion module 11 is used to acquire multiple reference legal text information, and to perform entity relationship parsing and conversion on the reference legal text information to obtain multiple legal structured data units. The legal structured data units include legal entities, clause content and logical relationships between clauses.
[0163] The tag mapping module 12 is used to determine the basic attribute classification tag, legal semantic tag, and legal practice risk tag for the legal structured data unit, and to perform multimodal tag mapping on the legal structured data unit based on the basic attribute classification tag, legal semantic tag, and legal practice risk tag to obtain the legal structured data unit carrying a multimodal fusion tag.
[0164] The regulatory processing module 13 is used to construct a regulatory knowledge graph for the reference regulatory text information based on the regulatory structured data unit and the multimodal fusion tag, so as to perform user dialogue response processing on the reference regulatory based on the regulatory knowledge graph through a dialogue processing large language model.
[0165] In one feasible implementation, the step of determining the basic attribute classification label, legal semantic label, and legal practice risk label for the legal structured data unit, and performing multimodal label mapping on the legal structured data unit based on the basic attribute classification label, legal semantic label, and legal practice risk label to obtain the legal structured data unit carrying a multimodal fusion label includes:
[0166] For the structured data unit of regulations, basic attribute classification labels are obtained by static regulation attribute parsing based on a preset legal rule base, regulation semantic labels are obtained by text semantic parsing based on a pre-trained target large language model, and regulation practice risk labels are obtained by regulation practice association parsing based on a preset external regulation practice data source.
[0167] Based on the basic attribute classification labels, the legal semantic labels, and the legal practice risk labels, the legal structured data unit is processed by label mapping to obtain the legal structured data unit carrying multimodal fusion labels.
[0168] In one feasible implementation, the step of obtaining basic attribute classification labels by performing static legal attribute parsing based on a preset legal rule base, obtaining legal semantic labels by performing text semantic parsing based on a pre-trained target large language model, and obtaining legal practice risk labels by performing legal practice association parsing based on a preset external legal practice data source includes:
[0169] Extract the clause content keywords corresponding to the structured data unit of the law, match the clause content keywords with the industry classification rules and legal type rules in the preset legal rule library, and when the clause content keywords match the target rule in the preset legal rule library, determine the target law attribute tag corresponding to the target rule as the basic attribute classification tag for the structured data unit of the law.
[0170] The structured data unit of regulations and the basic attribute classification labels are input into the target large language model. Semantic recognition is performed through the target large language model to obtain potential regulatory concepts and business constraints. Based on the potential regulatory concepts and business constraints, regulatory semantic labels for the structured data unit of regulations are extracted.
[0171] Using the clause number or clause content in the structured data unit of regulations as a reference anchor, judicial case data and regulatory penalty update records associated with the reference anchor are retrieved from a preset external regulatory practice data source. Based on the judicial case data and regulatory penalty update records, the practical risk indicator characteristics corresponding to the structured data unit of regulations are determined, and a regulatory practice risk label for the structured data unit of regulations is generated based on the practical risk indicator characteristics.
[0172] In one feasible implementation, the entity relationship parsing and transformation of the referenced regulatory text information yields multiple structured regulatory data units. These structured data units include legal entities, clause content, and logical relationships between clauses, including:
[0173] The reference regulatory text information is filtered to remove non-regulatory text noise characters, and the filtered reference regulatory text information is segmented into semantic logical units based on a pre-trained semantic sentence segmentation model to obtain multiple clause text fragments.
[0174] Entity recognition is performed on the text fragments of the clauses to obtain legal entities including legal subjects, obligees, and key time limits. The logical relationship between the rights and obligations of the legal subjects and the obligees is extracted as the logical relationship between the clauses.
[0175] The numbered index of the clause text fragments, the legal entities, and the logical relationships between the clauses are structured to obtain the regulatory structured data units.
[0176] In one feasible implementation, the step of processing user dialogue responses based on the regulatory knowledge graph using a dialogue processing large language model includes:
[0177] In response to a user's reference regulation query request input into the large language model of the dialogue processing;
[0178] The reference regulation query request is parsed into a structured graph query command;
[0179] Based on the structured graph query command, the target node is located in the legal knowledge graph, and the node clause content information and node multimodal fusion tags of the target node and its extended related nodes are queried. An enhanced context is constructed based on the node clause content information and node multimodal fusion tags.
[0180] The large language model controlling the dialogue processing generates a legal inquiry response based on the reference legal inquiry request and the enhanced context, thereby obtaining the user's legal inquiry response.
[0181] In one feasible implementation, the step of locating a target node in the regulatory knowledge graph based on the structured graph query command, querying the node clause content information and node multimodal fusion tags of the target node and its extended associated nodes, and constructing an enhanced context based on the node clause content information and node multimodal fusion tags includes:
[0182] Based on the tag filtering conditions in the structured graph query instruction, the target node is located in the node tag index corresponding to the legal knowledge graph, and extended related nodes that have a reference relationship or semantic dependency relationship with the target node are recalled in the legal knowledge graph along the logical relationship between the target clauses of the target node.
[0183] The node clause content information and node multimodal fusion tags of the target node and the extended associated nodes are integrated to construct an enhanced context.
[0184] In one feasible implementation, the step of constructing a regulatory knowledge graph based on the regulatory structured data unit and the multimodal fusion tag for the reference regulatory text information includes:
[0185] Initiate the construction of a chronological legal knowledge graph;
[0186] The structured data units of the regulations are mapped to graph nodes, and time dimension information is associated with the graph nodes. The time dimension information includes the publication time, effective time, expiration time and version number. Node relationship edges are established for the graph nodes based on the logical relationships between the clauses.
[0187] Based on the multimodal fusion tags and the graph nodes, a node tag index corresponding to the legal knowledge graph is established.
[0188] It should be noted that the regulatory parsing and processing device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the regulatory parsing and processing method. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the regulatory parsing and processing device and the regulatory parsing and processing method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.
[0189] The example numbers in this specification are for descriptive purposes only and do not represent the superiority or inferiority of the examples.
[0190] This specification also provides a computer storage medium that can store multiple instructions adapted to be loaded and executed by a processor as described above. Figures 1-4 The regulatory parsing and processing method described in the illustrated embodiment can be found in the following documentation for its specific execution process. Figures 1-4 The specific details of the illustrated embodiments will not be elaborated here.
[0191] This specification also provides a computer program product that stores at least one instruction, said at least one instruction being loaded and executed by the processor as described above. Figures 1-4 The regulatory parsing and processing method described in the illustrated embodiment can be found in the following documentation for its specific execution process. Figures 1-4 The specific details of the illustrated embodiments will not be elaborated here.
[0192] Please refer to Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of this specification. The electronic device in this specification may include one or more of the following components: a processor 1010, a memory 1020, an input device 1030, an output device 1040, and a bus 1050. The processor 1010, memory 1020, input device 1030, and output device 1040 may be connected to each other via the bus 1050.
[0193] Processor 1010 may include one or more processing cores. Processor 1010 connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 1020, and by calling data stored in memory 1020. Optionally, processor 1010 may be implemented using at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). Processor 1010 may integrate one or a combination of central processing unit (CPU), graphics processing unit (GPU), and modem. The CPU mainly handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem is used for wireless communication. It is understood that the modem may also not be integrated into processor 1010 and may be implemented separately through a communication chip.
[0194] The memory 1020 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 1020 may include non-transitory computer-readable storage medium. The memory 1020 may be used to store instructions, programs, code, code sets, or instruction sets.
[0195] The input device 1030 is used to receive input instructions or data, and includes, but is not limited to, a keyboard, mouse, camera, microphone, or touch device. The output device 1040 is used to output instructions or data, and includes, but is not limited to, a display device and a speaker. In this embodiment, the input device 1030 can be a temperature sensor for acquiring the operating temperature of the electronic device. The output device 1040 can be a speaker for outputting audio signals.
[0196] In addition, those skilled in the art will understand that the structure of the electronic device shown in the above figures does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device may also include radio frequency circuits, input units, sensors, audio circuits, wireless fidelity (WIFI) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.
[0197] In the embodiments of this specification, the executing entity for each step can be the electronic device described above. Optionally, the executing entity for each step can be the operating system of the electronic device. The operating system can be Android, iOS, or other operating systems; this specification does not limit this.
[0198] exist Figure 6 In the electronic device, the processor 1010 can be used to call a program stored in the memory 1020 and execute it to implement the regulatory parsing processing method as described in the various method embodiments of this specification.
[0199] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0200] The above-disclosed embodiments are merely preferred embodiments of this specification and should not be construed as limiting the scope of this specification. Therefore, any equivalent variations made in accordance with the claims of this specification shall still fall within the scope of this specification.
Claims
1. A method for processing legal interpretation, characterized in that, The method includes: Multiple reference legal texts are obtained, and entity relationship parsing and transformation are performed on the reference legal texts to obtain multiple legal structured data units. The legal structured data units include legal entities, clause content, and logical relationships between clauses. Extract the clause content keywords corresponding to the structured data unit of the law, match the clause content keywords with the industry classification rules and legal type rules in the preset legal rule library, and when the clause content keywords match the target rule in the preset legal rule library, determine the target law attribute tag corresponding to the target rule as the basic attribute classification tag for the structured data unit of the law. The structured data unit of regulations and the basic attribute classification labels are input into the target large language model. Semantic recognition is performed through the target large language model to obtain potential regulatory concepts and business constraints. Based on the potential regulatory concepts and business constraints, regulatory semantic labels for the structured data unit of regulations are extracted. Using the clause number or clause content in the structured data unit of the regulations as a reference anchor, the judicial case data and regulatory penalty update records associated with the reference anchor are retrieved from a preset external regulatory practice data source. Based on the judicial case data and regulatory penalty update records, the practical risk indicator characteristics corresponding to the structured data unit of the regulations are determined. Based on the practical risk indicator characteristics, a regulatory practice risk label for the structured data unit of the regulations is generated. Based on the basic attribute classification labels, the legal semantic labels, and the legal practice risk labels, the legal structured data unit is processed by label mapping to obtain the legal structured data unit carrying multimodal fusion labels; Based on the structured data units of the regulations and the multimodal fusion tags, a regulatory knowledge graph is constructed for the text information of the reference regulations, so as to perform user dialogue response processing based on the regulatory knowledge graph through a dialogue processing large language model.
2. The method according to claim 1, characterized in that, The entity relationship parsing and transformation of the referenced regulatory text information yields multiple structured regulatory data units. These structured data units include legal entities, clause content, and logical relationships between clauses, including: The reference regulatory text information is filtered to remove non-regulatory text noise characters, and the filtered reference regulatory text information is segmented into semantic logical units based on a pre-trained semantic sentence segmentation model to obtain multiple clause text fragments. Entity recognition is performed on the text fragments of the clauses to obtain legal entities including legal subjects, obligees, and key time limits. The logical relationship between the rights and obligations of the legal subjects and the obligees is extracted as the logical relationship between the clauses. The numbered index of the clause text fragments, the legal entities, and the logical relationships between the clauses are structured to obtain the regulatory structured data units.
3. The method according to claim 1, characterized in that, The process of handling user dialogue responses based on the legal knowledge graph using a large language model for dialogue processing includes: In response to a user's reference regulation query request input into the large language model of the dialogue processing; The reference regulation query request is parsed into a structured graph query command; Based on the structured graph query command, the target node is located in the legal knowledge graph, and the node clause content information and node multimodal fusion tags of the target node and its extended related nodes are queried. An enhanced context is constructed based on the node clause content information and node multimodal fusion tags. The large language model controlling the dialogue processing generates a legal inquiry response based on the reference legal inquiry request and the enhanced context, thereby obtaining the user's legal inquiry response.
4. The method according to claim 3, characterized in that, The step of locating the target node in the legal knowledge graph based on the structured graph query command, querying the node clause content information and node multimodal fusion tags of the target node and its extended related nodes, and constructing an enhanced context based on the node clause content information and node multimodal fusion tags includes: Based on the tag filtering conditions in the structured graph query instruction, the target node is located in the node tag index corresponding to the legal knowledge graph, and extended related nodes that have a reference relationship or semantic dependency relationship with the target node are recalled in the legal knowledge graph along the logical relationship between the target clauses of the target node. The node clause content information and node multimodal fusion tags of the target node and the extended associated nodes are integrated to construct an enhanced context.
5. The method according to claim 1, characterized in that, The construction of a regulatory knowledge graph based on the regulatory structured data units and the multimodal fusion tags for the reference regulatory text information includes: Initiate the construction of a chronological legal knowledge graph; The structured data units of the regulations are mapped to graph nodes, and time dimension information is associated with the graph nodes. The time dimension information includes the publication time, effective time, expiration time and version number. Node relationship edges are established for the graph nodes based on the logical relationships between the clauses. Based on the multimodal fusion tags and the graph nodes, a node tag index corresponding to the legal knowledge graph is established.
6. A regulatory analysis and processing device, characterized in that, The device includes: The parsing and conversion module is used to obtain multiple reference legal text information, and to perform entity relationship parsing and conversion on the reference legal text information to obtain multiple legal structured data units. The legal structured data units include legal entities, clause content and logical relationships between clauses. The tag mapping module is used to extract keywords from the clause content corresponding to the structured legal data unit, match the clause content keywords with industry classification rules and legal type rules in a preset legal rule base, and when the clause content keywords match a target rule in the preset legal rule base, the target legal attribute tag corresponding to the target rule is determined as the basic attribute classification tag for the structured legal data unit. The structured legal data unit and the basic attribute classification tag are input into a target large language model, and semantic recognition is performed through the target large language model to obtain potential legal concepts and business constraints. Based on the potential legal concepts and business constraints, the structured legal data unit is extracted. The legal semantic tag for the data unit is obtained by using the clause number or clause content in the legal structured data unit as a reference anchor point, retrieving judicial case data and legal penalty update records associated with the reference anchor point from a preset external legal practice data source, determining the practical risk indicator features corresponding to the legal structured data unit based on the judicial case data and legal penalty update records, generating a legal practice risk tag for the legal structured data unit based on the practical risk indicator features, and performing tag mapping processing on the legal structured data unit based on the basic attribute classification tag, the legal semantic tag, and the legal practice risk tag to obtain the legal structured data unit carrying a multimodal fusion tag; The regulatory processing module is used to construct a regulatory knowledge graph for the reference regulatory text information based on the regulatory structured data unit and the multimodal fusion tag, so as to perform user dialogue response processing on the reference regulations based on the regulatory knowledge graph through a dialogue processing large language model.
7. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as described in any one of claims 1 to 5.
8. A computer program product, characterized in that, The computer program product stores at least one instruction, which is loaded by a processor and executed as described in any one of claims 1 to 5.
9. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Enterprise smart legal affair platform system based on generative language large model
CN120387503A
Enterprise knowledge graph driven legal compliance auditing response method
CN120874848A