Intelligent consultation method and system based on dynamic legal knowledge graph and multi-modal recommendation

By constructing a dynamic legal knowledge graph and using a multimodal recommendation method, the problems of knowledge lag, inaccurate matching, and single results in the legal intelligent consultation system were solved, enabling real-time updates and multimodal recommendations, thereby improving consultation quality and user experience.

CN121636779APending Publication Date: 2026-03-10ANHUI TELECOMM ENG
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing legal intelligent consultation systems suffer from problems such as static and outdated knowledge, inaccurate demand matching, fixed recommendation topology, and monotonous result formats, leading to poor consultation quality and unpleasant user experience.

Method used

We construct a dynamic legal knowledge graph, combine it with multimodal recommendation methods, obtain users' multimodal features, calculate the matching degree in real time, optimize knowledge updates and topology reconstruction, and provide multimodal recommendation results.

Benefits of technology

It enables real-time updates of legal knowledge, improves the accuracy of demand matching, optimizes recommendation paths, adapts to the information receiving habits of different users, and enhances consultation quality and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121636779A_ABST
    Figure CN121636779A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent consultation method and system based on a dynamic legal knowledge graph and multi-modal recommendation, and relates to the technical field of intelligent legal consultation, and the method comprises the steps: constructing the dynamic legal knowledge graph which comprises a law provision layer, a case layer, a user consultation layer and a knowledge association layer, selecting a plurality of knowledge nodes in a legal knowledge space, the knowledge nodes comprise a law article node, a case node and a consultation demand node, and any knowledge node is selected as a coordinate origin to establish a knowledge association three-dimensional coordinate system. According to the technical scheme, external legal data are synchronized in real time through the update triggering unit, and recommendation of lagged content is avoided; the matching degree is calculated in combination with multi-modal features, the demand misjudgment rate is reduced, knowledge updating and topology reconstruction are optimized, irrelevant node calculation is reduced, calculation power consumption is reduced, a multi-modal recommendation result is provided, and information receiving habits of different users are adapted.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of legal intelligent consultation, and particularly relates to a dynamic legal knowledge graph-based and multi-modal recommendation intelligent consultation method and system. BACKGROUND

[0002] The existing legal intelligent consultation system has the following defects: 1. Legal knowledge is static and lags behind, and cannot respond to amendments of legal provisions and release of new cases in real time, which easily leads to invalid recommended content; 2. User demand matching only depends on text keywords, and multi-modal information such as voice emotion and image evidence is ignored, which is low in matching accuracy; 3. The recommended path is fixed, and the knowledge node correlation relationship is not optimized, which is large in computing power consumption and low in recommendation efficiency; 4. The recommended result is single in form and is difficult to adapt to the information receiving habits of different users. These problems lead to poor consultation quality and poor user experience, and need to be solved urgently. SUMMARY

[0003] In order to overcome the defects of the prior art, the application provides a safe power cabinet, which solves the problems of "static and lagging knowledge, inaccurate demand matching, fixed recommendation topology and single result form" of the existing legal intelligent consultation system.

[0004] In order to solve the above technical problems, the basic technical scheme of the application is as follows: a dynamic legal knowledge graph-based and multi-modal recommendation intelligent consultation method, comprising the following steps:

[0005] S1. Constructing a dynamic legal knowledge graph, the dynamic legal knowledge graph comprising a legal provision layer, a case layer, a user consultation layer and a knowledge correlation layer, a plurality of knowledge nodes being selected in a legal knowledge space, the knowledge nodes comprising legal provision nodes, case nodes and consultation demand nodes, and a knowledge correlation three-dimensional coordinate system being established by selecting any one of the knowledge nodes as a coordinate origin;

[0006] S2. Obtaining user consultation demand and user multi-modal features, the user multi-modal features comprising text features, voice features and image features, and a feature extraction model being used to measure feature vectors of the user multi-modal features in the knowledge correlation three-dimensional coordinate system; obtaining correlation normal vectors of each knowledge node in the knowledge correlation three-dimensional coordinate system, executing a demand perception strategy, calculating an included angle between the feature vectors and the correlation normal vectors, and calculating a matching degree of each knowledge node and the user consultation demand in real time;

[0007] S3. Setting a demand matching effective coefficient; executing a demand matching strategy, calculating a matching threshold of the user consultation demand and the knowledge nodes, and classifying the knowledge nodes into two categories based on the matching threshold, namely core matching nodes and candidate matching nodes;

[0008] S4, acquiring a current knowledge update priority of each candidate matching node; calculating a knowledge association distance between each core matching node and the candidate matching node; performing a knowledge update optimization strategy to update the legal knowledge associated with the core matching node to the candidate matching node, and recording the candidate matching node for storing the updated legal knowledge as an updated matching node;

[0009] S5, setting a target time for feeding back the multi-modal recommendation result to the user; the dynamic legal knowledge graph updates the knowledge node information based on the external legal data source in real time, executes a knowledge update estimation module, estimates the knowledge update amount of each updated matching node from the current time to the target time, and records it as an accumulated update amount;

[0010] S6, setting an update amount threshold, if the accumulated update amount is less than the update amount threshold, it is determined that the updated matching node corresponding to the accumulated update amount cannot be directly used as a recommendation node to feed back to the user; performing a recommendation topology reconstruction strategy to filter core recommendation nodes in the updated matching node and reconstruct a recommendation topology network graph for transmitting the multi-modal recommendation result.

[0011] Preferably, the statute layer stores valid legal provisions, administrative regulations, judicial interpretations, each statute node is associated with statute number, effective date, revision record;

[0012] The case layer stores judicial documents, guidance cases, typical cases, each case node is associated with case number, court of adjudication, date of adjudication, legal application clause;

[0013] The user consultation layer stores historical user consultation records and consultation feedback results, each consultation demand node is associated with user identification, consultation content and demand type;

[0014] The knowledge association layer stores the association relationship between nodes of each layer, including the application association of statutes and cases, the similar association of cases and consultation demands, and the matching association of statutes and consultation demands;

[0015] The dynamic legal knowledge graph further comprises an update triggering unit, which starts the knowledge node update when the external legal data source publishes new statutes, revised statutes or new cases.

[0016] Preferably, the user consultation demand and the user multi-modal feature are acquired, a demand perception strategy is executed, the included angle between the feature vector and the associated vector is calculated, and the matching degree between each knowledge node and the user consultation demand is calculated in real time, including:

[0017] Acquiring the number of legal knowledge updates d on the same day; calculating the basic matching coefficient of the knowledge node on the same day , Wherein κ is the knowledge base coefficient, and the value range is 0.8 to 1.2;

[0018] calculating a cosine value cosθ of an angle θ between the feature vector and an associated normal vector of the knowledge node; the associated normal vector is a directional vector of the knowledge node in a knowledge associated three-dimensional coordinate system, denoted as n=x n , y n , z n , x n , y n , z n are coordinate values of the associated normal vector on an x-axis, a y-axis and a z-axis of the knowledge associated three-dimensional coordinate system, respectively;

[0019] the feature vector is a directional vector of the user multi-modal feature in the knowledge associated three-dimensional coordinate system, denoted as u=xᵤ, yᵤ, zᵤ, xᵤ, yᵤ, zᵤ are coordinate values of the feature vector on the x-axis, the y-axis and the z-axis of the knowledge associated three-dimensional coordinate system, respectively;

[0020] ;

[0021] calculating a matching degree I between the knowledge node and the user consulting demand, I=I0×max(0, cosθ), wherein when cosθ≤0, the knowledge node has no matching relationship with the user consulting demand, and I=0.

[0022] Preferably, the demand matching strategy is executed, a matching threshold of the user consulting demand and the knowledge node is calculated, and the knowledge node is divided into two categories based on the matching threshold, including:

[0023] denote a demand matching effective coefficient as γ, and a value range of γ is 0.5 to 0.7;

[0024] calculating the matching threshold I*, I*=I0×γ;

[0025] comparing the matching degree I of the knowledge node with the matching threshold I*;

[0026] if I≥I*, the knowledge node is determined as a core matching node;

[0027] if I<I*, the knowledge node is determined as a candidate matching node, and the candidate matching node is controlled to not participate in initial recommendation.

[0028] Preferably, the knowledge updating optimization strategy is executed, and legal knowledge associated with the core matching node is updated to the candidate matching node, including:

[0029] obtaining coordinate values x i, y i, z i of the core matching node i in the knowledge correlation three-dimensional coordinate system; obtaining coordinate values x j, y j, z j of the candidate matching node j in the knowledge correlation three-dimensional coordinate system; calculating a knowledge correlation distance d(i, j) between the core matching node i and the candidate matching node j, d(i, j) = √[(x i - x j ) 2 + (y i - y j ) 2 + (z i - z j ) 2 ];

[0030] setting a first indication function Ξ i j, when the legal knowledge of the core matching node i is updated to the candidate matching node j, Ξ i j = 1; when the legal knowledge of the core matching node i is not updated to the candidate matching node j, Ξ i j = 0; setting a second indication function Φ j, when the candidate matching node j is an updated matching node, Φ j = 1; when the candidate matching node j is not an updated matching node, Φ j = 0;

[0031] setting a knowledge update priority of the candidate matching node j as P j, the value range of P j is 0 to 1, and the greater the value is, the higher the update priority is;

[0032] setting a knowledge update optimization objective function Ω, wherein ω 1 is an updated node quantity weight, ω 2 is an associated distance weight, ω 3 is an update burden weight, ω 1 + ω 2 + ω 3 = 1, and ε is a numerical stable positive constant and takes a value of 10 -6 6 ;

[0033] setting a first constraint condition that the legal knowledge associated with each core matching node is updated to at least one updated matching node, i.e., Σ Ξ i j ≥ 1;

[0034] setting a second constraint condition that the legal knowledge is only updated to the updated matching node, i.e., Ξ i j ≤ Φ j, when Φ j = 0, Ξ i j = 0.

[0035] Preferably, the execution knowledge update estimation module estimates the knowledge update amount of each updated matching node from a current time to a target time, which includes:

[0036] obtaining a knowledge storage capacity A j of the updated matching node j;

[0037] setting the current time as t 1 and the target time as t 2 ;

[0038] calculating a knowledge update amount E' j of the updated matching node j in a period from t 1 to t 2, ;

[0039] wherein I j (t) is a matching degree of the updated matching node j at any time t between t 1 and t 2, η is a knowledge updating efficiency factor, and is in a range of 0.6 to 0.9, and is used to represent an effective conversion rate of knowledge updating.

[0040] Preferably, the execution of the recommended topology reconstruction strategy, screening of the core recommended nodes in the updated matching nodes, and reconstruction of the recommended topology network graph for transmission of the multi-modal recommended result include:

[0041] obtaining coordinate values x k ,y k ,z k of the updated matching node k in the knowledge correlation three-dimensional coordinate system;

[0042] obtaining coordinate values x m ,y m ,z m of the updated matching node m in the knowledge correlation three-dimensional coordinate system;

[0043] calculating a knowledge correlation distance d(k,m) between the updated matching node k and the updated matching node m, ;

[0044] setting a recommended transmission distance threshold d*, which is set according to the scale of the knowledge correlation three-dimensional coordinate system;

[0045] constructing a recommended topology network graph, and taking all the updated matching nodes as nodes in the recommended topology network graph;

[0046] if d(k,m)≤d*, an edge of the recommended topology network graph is constructed between the updated matching node k and the updated matching node m, and an initial weight of the edge is equal to d(k,m);

[0047] calculating a centrality Φ(k) of the updated matching node k, wherein Q is a total number of the updated matching nodes, d path (k,r) is a shortest knowledge correlation path length between the updated matching node k and an updated matching node r calculated by using a breadth-first search algorithm, and r is any updated matching node in the recommended topology network graph except k;

[0048] obtaining a number of nodes deg(k) connected to the updated matching node k by an edge, deg(k) being a connectivity of the updated matching node k;

[0049] calculating a recommended score Ψ k of the updated matching node k, wherein α is a centrality weight, β is an updating amount weight, τ is a connectivity weight, α+β+τ=1, and E k is an accumulated updating amount of the updated matching node k;

[0050] a recommendation score threshold Ψ* is set, the value range of Ψ* is 0.4 to 0.6; if Ψ k ≥Ψ∗, the updated matching node k is taken as a core recommendation node;

[0051] the weight of the edge in the recommendation topology network graph is updated to cost(k,m), , wherein E' m is the accumulated update amount of the updated matching node m;

[0052] The breadth-first search algorithm is used to calculate the core recommendation node with the lowest path cost of each updated matching node m, and the core recommendation node is taken as the node for feeding back the multi-modal recommendation result to the user;

[0053] At the target time, all core recommendation nodes control the multi-modal recommendation result to the user, and the multi-modal recommendation result includes at least two of statute text, case document, process visualization chart and voice interpretation.

[0054] Preferably, the acquisition of the user multi-modal features includes:

[0055] The user consultation text is acquired through a text input unit, and text features are extracted, including keywords, legal field terms, and sentence semantic vectors;

[0056] The user consultation voice is acquired through a voice collection unit, and voice features are extracted, including speech speed, tone, and emotional features;

[0057] The evidence image uploaded by the user is acquired through an image collection unit, and image features are extracted, including text information and image content semantic vectors;

[0058] The feature extraction model includes a text feature extraction model, a voice feature extraction model, and an image feature extraction model; the text feature extraction model uses a BERT model, the voice feature extraction model uses an MFCC+CNN model, and the image feature extraction model uses a ResNet+OCR model.

[0059] The dynamic legal knowledge graph and the multi-modal recommendation intelligent consulting system, characterized by comprising:

[0060] A dynamic knowledge graph construction module is used to construct a dynamic legal knowledge graph, a plurality of knowledge nodes are selected in a legal knowledge space, and a knowledge correlation three-dimensional coordinate system is established;

[0061] A user demand acquisition module is used to acquire user consultation demands and user multi-modal features, and a feature extraction model is used to measure the feature vector of the user multi-modal features in the knowledge correlation three-dimensional coordinate system;

[0062] a demand matching module configured to obtain an associated normal vector of each knowledge node, perform a demand awareness strategy to calculate a matching degree, and perform a demand matching strategy to divide core matching nodes and candidate matching nodes;

[0063] a knowledge update optimization module configured to obtain a knowledge update priority of the candidate matching node, calculate a knowledge associated distance, and perform a knowledge update optimization strategy to obtain an updated matching node;

[0064] a multi-modal recommendation module configured to set a target time for feedback of a multi-modal recommendation result, and perform the knowledge update estimation module to estimate an accumulated update amount;

[0065] a recommendation topology reconstruction module configured to set an update amount threshold, perform a recommendation topology reconstruction strategy to screen core recommendation nodes and reconstruct a recommendation topology network graph;

[0066] a main control module electrically connected with the dynamic knowledge graph construction module, the user demand acquisition module, the demand matching module, the knowledge update optimization module, the multi-modal recommendation module, and the recommendation topology reconstruction module, and configured to control a working time sequence and data interaction of each module.

[0067] Preferably, the dynamic knowledge graph construction module comprises a knowledge storage unit, an association construction unit, an update triggering unit, and a coordinate mapping unit; the knowledge storage unit is configured to store node data of a legal provision layer, a case layer, and a user consultation layer; the association construction unit is configured to construct a knowledge association layer; the update triggering unit is configured to monitor external legal data sources and trigger knowledge node updates; and the coordinate mapping unit is configured to map knowledge nodes to a knowledge association three-dimensional coordinate system to generate an associated normal vector.

[0068] The user demand acquisition module comprises a text input unit, a voice acquisition unit, an image acquisition unit, a multi-modal feature extraction unit, and a feature vector generation unit; the multi-modal feature extraction unit comprises a text feature extraction subunit, a voice feature extraction subunit, and an image feature extraction subunit; and the feature vector generation unit is configured to generate a feature vector of multi-modal features of a user.

[0069] The present application has the following advantages:

[0070] The technical solution of the present application synchronizes external legal data in real time through the update triggering unit to avoid recommendation lag; calculates a matching degree in combination with multi-modal features to reduce demand misjudgment rate, optimizes knowledge update and topology reconstruction, reduces irrelevant node calculation, reduces computing power consumption, provides multi-modal recommendation results, and adapts to information receiving habits of different users. BRIEF DESCRIPTION OF DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0072] Figure 1 The flow chart of the present application based on dynamic legal knowledge graph and multi-modal recommendation intelligent consulting method;

[0073] Figure 2 The system block diagram of the present application based on dynamic legal knowledge graph and multi-modal recommendation intelligent consulting system. DETAILED DESCRIPTION

[0074] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0075] In order to better understand the above technical solutions, the above technical solutions will be described in detail in combination with the drawings in the specification and specific embodiments.

[0076] According to the drawings Figure 1 Figure 2 As shown in the drawings, the dynamic legal knowledge graph and multi-modal recommendation intelligent consulting method based on the dynamic legal knowledge graph and multi-modal recommendation intelligent consulting method, comprising:

[0077] S1, constructing a dynamic legal knowledge graph, the dynamic legal knowledge graph comprises a law article layer, a case layer, a user consulting layer and a knowledge correlation layer, a plurality of knowledge nodes are selected in the legal knowledge space, the knowledge nodes comprise law article nodes, case nodes and consulting demand nodes, and a knowledge correlation three-dimensional coordinate system is established by selecting a knowledge node as a coordinate origin;

[0078] S2, obtaining user consulting demand and user multi-modal features, the user multi-modal features comprise text features, voice features and image features, using a feature extraction model to measure the feature vector of the user multi-modal features in the knowledge correlation three-dimensional coordinate system; obtaining the correlation normal vector of each knowledge node in the knowledge correlation three-dimensional coordinate system, executing a demand perception strategy, calculating the included angle between the feature vector and the correlation normal vector, and calculating the matching degree of each knowledge node and the user consulting demand in real time;

[0079] ​S3. Set the demand matching effectiveness coefficient; execute the demand matching strategy, calculate the matching threshold between user consultation needs and knowledge nodes, and divide the knowledge nodes into two categories based on the matching threshold: core matching nodes and candidate matching nodes.

[0080] S4. Obtain the current knowledge update priority of each candidate matching node; calculate the knowledge association distance between each core matching node and the candidate matching node; execute the knowledge update optimization strategy to update the legal knowledge associated with the core matching node to the candidate matching node, and record the candidate matching node used to store the updated legal knowledge as the updated matching node.

[0081] S5. Set the target time for feeding back the multimodal recommendation results to the user; the dynamic legal knowledge graph updates knowledge node information in real time based on external legal data sources, executes the knowledge update estimation module, estimates the knowledge update amount of each updated matching node from the current time to the target time, and records it as the accumulated update amount;

[0082] S6. Set an update amount threshold. If the accumulated update amount is less than the update amount threshold, it is determined that the updated matching node corresponding to the accumulated update amount cannot be directly used as a recommendation node to provide feedback to the user. Execute the recommendation topology reconstruction strategy, select core recommendation nodes from the updated matching nodes, and reconstruct the recommendation topology network graph used to transmit multimodal recommendation results.

[0083] The legal provisions layer stores currently effective legal provisions, administrative regulations, and judicial interpretations. Each legal provision node is associated with the legal provision number, effective date, and revision record.

[0084] The case layer stores judgment documents, guiding cases, and typical cases. Each case node is associated with the case number, the court that adjudicated the judgment, the date of the judgment, and the applicable legal clauses.

[0085] The user consultation layer stores historical user consultation records and consultation feedback results. Each consultation request node is associated with a user identifier, consultation content, and request type.

[0086] The knowledge association layer stores the relationships between nodes in each layer, including the applicability of legal provisions and cases, the similarity of cases and consultation needs, and the matching of legal provisions and consultation needs.

[0087] The dynamic legal knowledge graph also includes an update trigger unit. When an external legal data source publishes new legal provisions, revised legal provisions, or new cases, the update trigger unit initiates the knowledge node update.

[0088] The process of acquiring user consultation needs and user multimodal characteristics, executing a need-aware strategy, calculating the angle between the feature vector and the associated normal vector, and calculating the matching degree between each knowledge node and the user consultation needs in real time includes:

[0089] Get the number of legal knowledge updates for the day, d; calculate the basic matching coefficient of knowledge nodes for the day. , , where κ is the knowledge base coefficient, with a value ranging from 0.8 to 1.2;

[0090] For any knowledge node, calculate the cosine of the angle θ between its feature vector and the associated normal vector, cosθ; the associated normal vector is the direction vector of the knowledge node in the knowledge association three-dimensional coordinate system, denoted as n=x. n y n z n x n y n z n These are the coordinates of the associated normal vector along the x-axis, y-axis, and z-axis of the knowledge association 3D coordinate system, respectively.

[0091] The feature vector is the direction vector of the user's multimodal features in the knowledge association three-dimensional coordinate system, denoted as u=xᵤ, yᵤ, zᵤ, where xᵤ, yᵤ, and zᵤ are the coordinate values ​​of the feature vector on the x-axis, y-axis, and z-axis of the knowledge association three-dimensional coordinate system, respectively.

[0092] ;

[0093] Calculate the matching degree I between knowledge nodes and user consultation needs, I = I0 × max(0, cosθ), where when cosθ ≤ 0, there is no matching relationship between knowledge nodes and user consultation needs, and I = 0.

[0094] The execution demand matching strategy calculates the matching threshold between user consultation needs and knowledge nodes, and categorizes knowledge nodes into two types based on the matching threshold:

[0095] Let γ be the effective coefficient for demand matching, and let the value of γ range from 0.5 to 0.7.

[0096] Calculate the matching threshold I*, where I* = I0 × γ;

[0097] Compare the matching degree I of the knowledge node with the matching threshold I*;

[0098] If I ≥ I*, then the knowledge node is identified as a core matching node;

[0099] If I < I*, then the knowledge node is identified as a candidate matching node, and the candidate matching node is temporarily excluded from the initial recommendation.

[0100] The execution of the knowledge update optimization strategy, which updates the legal knowledge associated with the core matching node to the candidate matching node, includes:

[0101] Obtain the coordinates xᵢ, yᵢ, zᵢ of the core matching node i in the knowledge association three-dimensional coordinate system; obtain the coordinates xⱼ, yⱼ, zⱼ of the candidate matching node j in the knowledge association three-dimensional coordinate system; calculate the knowledge association distance d(i,j) between the core matching node i and the candidate matching node j, d(i,j)=√[(xᵢ−xⱼ)²+(yᵢ−yⱼ)²+(zᵢ−zⱼ)²];

[0102] Define a first indicator function Ξᵢⱼ: Ξᵢⱼ = 1 when the legal knowledge of core matching node i is updated to candidate matching node j; Ξᵢⱼ = 0 when the legal knowledge of core matching node i is not updated to candidate matching node j. Define a second indicator function Φⱼ: Φⱼ = 1 when candidate matching node j is the updated matching node; Φⱼ = 0 when candidate matching node j is not the updated matching node.

[0103] Let Pⱼ be the current knowledge update priority of candidate matching node j. The value of Pⱼ ranges from 0 to 1. The larger the value, the higher the update priority.

[0104] Define the knowledge update optimization objective function Ω. Where ω1 is the update node number weight, ω2 is the association distance weight, ω3 is the update burden weight, ω1+ω2+ω3=1, and ε is a numerically stable positive decimal constant with a value of 10⁻ 6 ;

[0105] The first constraint is set to ensure that the legal knowledge associated with each core matching node is updated to at least one updated matching node, i.e., ΣΞᵢⱼ≥1;

[0106] The second constraint is set so that legal knowledge is only updated to the matched node after the update, i.e., Ξᵢⱼ≤Φⱼ, and when Φⱼ=0, Ξᵢⱼ=0.

[0107] The knowledge update estimation module estimates the amount of knowledge update for each matched node from the current time to the target time, including:

[0108] Get the knowledge storage capacity Aⱼ of the updated matching node j;

[0109] Let the current time be t1 and the target time be t2;

[0110] Calculate the knowledge update amount E'ⱼ of the matched node j after the update during the time period t1 to t2. ;

[0111] Where Iⱼ(t) represents the matching degree of matching node j after the update at any time t between t1 and t2. Let η be the knowledge update rate of the matched node j at time t after the update, and let η be the knowledge update efficiency factor, which ranges from 0.6 to 0.9 and is used to represent the effective conversion rate of knowledge update.

[0112] The implementation of the recommendation topology reconstruction strategy, which involves selecting core recommendation nodes from the updated matching nodes and reconstructing the recommendation topology network graph for transmitting multimodal recommendation results, includes:

[0113] Retrieve the updated coordinates x of the matching node k in the knowledge association 3D coordinate system. k ,y k ,z k ;

[0114] Retrieve the updated coordinates x of the matching node m in the knowledge association 3D coordinate system. m ,y m ,z m ;

[0115] Calculate the knowledge association distance d(k,m) between the updated matching node k and the updated matching node m. ;

[0116] Set a recommended transmission distance threshold d∗, where d∗ is set according to the scale of the knowledge-related three-dimensional coordinate system;

[0117] Construct a recommended topology network graph, and use all updated matching nodes as nodes in the recommended topology network graph;

[0118] If d(k,m)≤d∗, then construct an edge in the recommended topology network graph between the updated matching node k and the updated matching node m, with the initial weight of the edge equal to d(k,m).

[0119] Calculate the centrality Φ(k) of the matched node k after the update. Where Q is the total number of matched nodes after the update, and d path (k,r) is the shortest knowledge association path length between the updated matching node k and the updated matching node r, calculated using the breadth-first search algorithm, where r is any updated matching node other than k in the recommendation topology network graph.

[0120] Get the number of nodes connected by edges to the updated matching node k, deg(k), where deg(k) is the connectivity of the updated matching node k.

[0121] Calculate the recommended score Ψ of the matched node k after the update. k , Where α is the centrality weight, β is the update weight, and τ is the connectivity weight, α+β+τ=1, E' k This represents the cumulative update amount for the matched node k after the update.

[0122] Set a recommendation rating threshold Ψ∗, where Ψ∗ ranges from 0.4 to 0.6; if Ψ k If ≥Ψ∗, then the updated matching node k will be used as the core recommendation node;

[0123] The weights of the edges in the updated recommended topology network graph are given by cost(k,m). , where E' m This represents the cumulative update amount for the matched node m after the update.

[0124] The breadth-first search algorithm is used to calculate the core recommendation node with the lowest path cost for each updated matching node m, and this core recommendation node is used as the node to finally provide multimodal recommendation results to the user.

[0125] At the target time, control all core recommendation nodes to provide multimodal recommendation results to the user. The multimodal recommendation results include at least two of the following: legal text, case documents, process visualization charts, and voice interpretation.

[0126] The acquisition of the user's multimodal features includes:

[0127] The user's consultation text is obtained through a text input unit, and text features are extracted, including keywords, legal terms, and sentence semantic vectors.

[0128] The user's inquiry voice is acquired through a voice acquisition unit, and voice features are extracted, including speech rate, tone, and emotion.

[0129] The image acquisition unit acquires evidence images uploaded by users and extracts image features, including text information and image content semantic vectors.

[0130] The feature extraction models include a text feature extraction model, a speech feature extraction model, and an image feature extraction model; the text feature extraction model uses the BERT model, the speech feature extraction model uses the MFCC+CNN model, and the image feature extraction model uses the ResNet+OCR model.

[0131] An intelligent consultation system based on dynamic legal knowledge graphs and multimodal recommendation includes:

[0132] The dynamic knowledge graph construction module is used to construct a dynamic legal knowledge graph, which selects multiple knowledge nodes in the legal knowledge space and establishes a three-dimensional coordinate system for knowledge association.

[0133] The user needs acquisition module is used to acquire user consultation needs and user multimodal features, and to use a feature extraction model to measure the feature vector of user multimodal features in the knowledge association three-dimensional coordinate system.

[0134] The demand matching module is used to obtain the associated normal vector of each knowledge node, execute the demand-aware strategy to calculate the matching degree, and execute the demand matching strategy to divide the core matching nodes and candidate matching nodes.

[0135] The knowledge update and optimization module is used to obtain the knowledge update priority of candidate matching nodes, calculate the knowledge association distance, and execute the knowledge update and optimization strategy to obtain the updated matching nodes.

[0136] The multimodal recommendation module is used to set the target time for feedback of multimodal recommendation results and execute the knowledge update estimation module to estimate the accumulated update amount.

[0137] The recommended topology reconstruction module is used to set the update amount threshold, execute the recommended topology reconstruction strategy to filter core recommended nodes and reconstruct the recommended topology network graph;

[0138] The main control module is electrically connected to the dynamic knowledge graph construction module, user demand acquisition module, demand matching module, knowledge update and optimization module, multimodal recommendation module, and recommendation topology reconstruction module, and is used to control the working sequence and data interaction of each module.

[0139] It also includes: the dynamic knowledge graph construction module comprises a knowledge storage unit, an association construction unit, an update triggering unit, and a coordinate mapping unit; the knowledge storage unit is used to store node data of the legal provisions layer, case layer, and user consultation layer; the association construction unit is used to construct a knowledge association layer; the update triggering unit is used to monitor external legal data sources and trigger knowledge node updates; the coordinate mapping unit is used to map knowledge nodes to a knowledge association three-dimensional coordinate system to generate association normal vectors;

[0140] The user requirement acquisition module includes a text input unit, a voice acquisition unit, an image acquisition unit, a multimodal feature extraction unit, and a feature vector generation unit; the multimodal feature extraction unit includes a text feature extraction subunit, a voice feature extraction subunit, and an image feature extraction subunit; the feature vector generation unit is used to generate feature vectors of user multimodal features.

[0141] The specific implementation method is as follows: Taking "user inquiry about housing rental breach of contract claim" as an example, the implementation process of this method is explained:

[0142] Graph Construction: The dynamic legal knowledge graph stores relevant clauses on breach of contract at the legal provisions layer, stores guiding cases on lease breach of contract at the case layer, and establishes the application association between clauses and cases at the knowledge association layer; when the Supreme People's Court releases a new lease breach of contract case, the update trigger unit starts the node update.

[0143] Demand Acquisition: Users input "landlord defaults on property delivery" via text, upload photos of rental contracts, or make voice inquiries. The multimodal feature extraction unit extracts text keywords, voice emotion, and image text information to generate feature vectors u=xᵤ,yᵤ,zᵤ.

[0144] Matching degree calculation: The number of legal knowledge updates on the same day is d=2, the knowledge base coefficient is κ=1.0, and the basic matching coefficient of the knowledge node is calculated as I0≈1.027; the cosine of the angle between the feature vector u and the associated normal vector of the lease default case node is calculated as cosθ≈0.92, and the matching degree is I≈0.945.

[0145] Node classification: Demand matching effectiveness coefficient γ=0.6, matching threshold I∗≈0.616; lease default case nodes with I≥I∗ are defined as core matching nodes, and other irrelevant nodes are defined as candidate matching nodes;

[0146] Knowledge update: Calculate the knowledge association distance between the core node and the candidate node, optimize the knowledge update through the objective function Ω, and obtain the updated matching node;

[0147] Update volume estimation: The target time is set as 10 minutes after consultation. After the update, the knowledge storage capacity of the matching node is A=10, the update efficiency factor is η=0.8, and the estimated cumulative update volume E'≈75.6 (knowledge units) meets the update volume threshold.

[0148] Topology reconstruction: Calculate the centrality and recommendation score of the updated matching nodes, and select core recommended nodes; update the edge weights of the recommended topology to the path cost, and plan the lowest cost path; at the target time, provide users with legal text, claim process diagrams, and voice interpretations through the core recommended nodes.

[0149] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A method for intelligent consultation based on dynamic legal knowledge graph and multi-modal recommendation, characterized in that, The method comprises the following steps: S1, constructing a dynamic legal knowledge graph, the dynamic legal knowledge graph comprising a law article layer, a case layer, a user consultation layer, and a knowledge association layer, a plurality of knowledge nodes being selected in a legal knowledge space, the knowledge nodes comprising law article nodes, case nodes, and consultation demand nodes, and a knowledge association three-dimensional coordinate system being established by taking an optional knowledge node as a coordinate origin; S2, obtaining user consultation demand and user multi-modal features, the user multi-modal features comprising text features, voice features, and image features, and measuring feature vectors of the user multi-modal features in the knowledge association three-dimensional coordinate system by using a feature extraction model; obtaining an association normal vector of each knowledge node in the knowledge association three-dimensional coordinate system, executing a demand perception strategy, calculating an included angle between the feature vector and the association normal vector, and calculating a matching degree of each knowledge node and the user consultation demand in real time; S3, setting a demand matching effective coefficient; executing a demand matching strategy, calculating a matching threshold of the user consultation demand and the knowledge nodes, and classifying the knowledge nodes into two categories based on the matching threshold, namely, core matching nodes and candidate matching nodes; S4, obtaining a current knowledge update priority of each candidate matching node; calculating a knowledge association distance between each core matching node and the candidate matching node; executing a knowledge update optimization strategy, updating legal knowledge associated with the core matching node to the candidate matching node, and recording the candidate matching node used for storing the updated legal knowledge as an updated matching node; S5, setting a target time for feeding back multi-modal recommendation results to the user; the dynamic legal knowledge graph updates knowledge node information based on an external legal data source in real time, executes a knowledge update estimation module, estimates a knowledge update amount of each updated matching node from a current time to the target time, and records the knowledge update amount as an accumulated update amount; S6, setting an update amount threshold, if the accumulated update amount is less than the update amount threshold, determining that the updated matching node corresponding to the accumulated update amount cannot be directly used as a recommendation node to feed back to the user; executing a recommendation topology reconstruction strategy, screening core recommendation nodes from the updated matching nodes, and reconstructing a recommendation topology network graph used for transmitting multi-modal recommendation results.

2. The intelligent consulting method based on dynamic legal knowledge graph and multi-modal recommendation according to claim 1, characterized in that: The law article layer stores valid legal articles, administrative regulations, and judicial interpretations, each law article node is associated with a law article number, an effective date, and revision records; The case layer stores judicial documents, guidance cases, and typical cases, each case node is associated with a case number, a court of adjudication, a date of adjudication, and a legal application clause; The user consultation layer stores historical user consultation records and consultation feedback results, each consultation demand node is associated with a user identifier, consultation content, and a demand type; The knowledge association layer stores association relationships among nodes of different layers, including application association between law articles and cases, similarity association between cases and consultation demand, and matching association between law articles and consultation demand; The dynamic legal knowledge graph further comprises an update triggering unit, which starts knowledge node updating when a new law article, a revised law article, or a new case is published by an external legal data source. 3.The method of claim 1, wherein: The acquiring user consultation demand and user multi-modal features, executing a demand perception strategy, calculating the included angle of the feature vector and the associated normal vector, and real-time calculating the matching degree of each knowledge node and the user consultation demand include: Acquire the number of legal knowledge updates d of the day; calculate the knowledge node basic matching coefficient of the day , , wherein κ is the knowledge base coefficient, and the value range is 0.8 to 1.2; The cosine value of the angle θ between the feature vector and the associated normal vector of the knowledge node is calculated for any knowledge node; the associated normal vector is the direction vector of the knowledge node in the knowledge association three-dimensional coordinate system, denoted as n=x n , y n , z n , x n , y n , z n are the coordinate values of the associated normal vector on the x-axis, y-axis and z-axis of the knowledge association three-dimensional coordinate system, respectively. The feature vector is a directional vector of the user multi-modal features in the knowledge association three-dimensional coordinate system, denoted as u=xu, yu, zu, xu, yu, zu are respectively the coordinate values of the feature vector in the knowledge association three-dimensional coordinate system x-axis, y-axis, z-axis. ; The matching degree I of the knowledge node and the user consultation demand is calculated, I=I0×max(0, cosθ), wherein when cosθ≤0, the knowledge node has no matching relationship with the user consultation demand, and I=0.

4. The intelligent consulting method based on dynamic legal knowledge graph and multi-modal recommendation according to claim 3, characterized in that: The executing demand matching strategy, calculating the matching threshold of the user consultation demand and the knowledge node, and classifying the knowledge node into two categories based on the matching threshold include: Denote the demand matching effective coefficient as γ, and the value range of γ is 0.5 to 0.7; The matching threshold I* is calculated, I*=I0×γ; The matching degree I of the knowledge node is compared with the matching threshold I*; If I≥I*, the knowledge node is determined as a core matching node; If I<I*, the knowledge node is determined as a candidate matching node, and the candidate matching node is controlled to not participate in initial recommendation.

5. The intelligent consulting method based on dynamic legal knowledge graph and multi-modal recommendation according to claim 1, characterized in that: The executing knowledge update optimization strategy, updating the legal knowledge associated with the core matching node to the candidate matching node includes: The coordinate values x, y, z of the core matching node i in the knowledge association three-dimensional coordinate system are acquired, and the coordinate values x, y, z of the candidate matching node j in the knowledge association three-dimensional coordinate system are acquired; the knowledge association distance d(i, j) of the core matching node i and the candidate matching node j is calculated, d(i, j)=√[(x-x)²+(y-y)²+(z-z)²]; The first indicator function Ξ is set, when the legal knowledge of the core matching node i is updated to the candidate matching node j, Ξ=1; when the legal knowledge of the core matching node i is not updated to the candidate matching node j, Ξ=0; the second indicator function Φ is set, when the candidate matching node j is an updated matching node, Φ=1; when the candidate matching node j is not an updated matching node, Φ=0; The current knowledge update priority of the candidate matching node j is denoted as P, and the value range of P is 0 to 1, and the greater the value is, the higher the update priority is; Setting a knowledge updating optimization objective function Ω, where ω1 is an updating node quantity weight, ω2 is an association distance weight, ω3 is an updating burden weight, ω1+ω2+ω3=1, and ε is a numerical stable positive decimal constant and takes a value of 10⁻ 6 ; The first constraint condition is that the legal knowledge associated with each core matching node is updated to at least one updated matching node, that is, ΣΞ≥1; The second constraint condition is that the legal knowledge is only updated to the updated matching node, that is, Ξ≤Φ, when Φ=0, Ξ=0.

6. The intelligent consulting method based on dynamic legal knowledge graph and multi-modal recommendation according to claim 1, characterized in that: The executing knowledge update estimation module estimates the knowledge update amount of each updated matching node from the current time to the target time includes: The knowledge storage capacity A of the updated matching node j is acquired; The current time is set as t1, and the target time is set as t2; calculating an amount of knowledge update E'j of the matching node j updated in the period from t1 to t2, ; where Ij(t) is the matching degree of the updated matching node j at any time t between t1 and t2, is the knowledge updating rate of the updated matching node j at time t, and η is a knowledge updating efficiency factor, which is in the range of 0.6 to 0.9 and is used to represent the effective conversion rate of knowledge updating.

7. The intelligent consulting method based on dynamic legal knowledge graph and multi-modal recommendation according to claim 1, characterized in that: The executing recommendation topology reconstruction strategy, screening the core recommendation node in the updated matching node, and reconstructing the recommendation topology network graph for transmitting the multi-modal recommendation result includes: Obtaining coordinate values x, y, z of the matching node k in the knowledge association three-dimensional coordinate system after the update k k k ;​​ Obtaining coordinate values x, y, z of the updated matching node m in the knowledge association three-dimensional coordinate system m m m ;​​ calculating a knowledge association distance d(k,m) of the updated matching node k and the updated matching node m, ; A recommended transmission distance threshold d* is set, and the d* is set according to the scale of the knowledge correlation three-dimensional coordinate system; A recommended topology network graph is constructed, and all updated matching nodes are taken as nodes in the recommended topology network graph; If d(k,m)≤d*, an edge of the recommended topology network graph is constructed between the updated matching node k and the updated matching node m, and the initial weight of the edge is equal to d(k,m); computing the centrality Φ(k) of the updated matching node k, where Q is the total number of updated matching nodes, d path (k, r) is the shortest knowledge association path length between the updated matching node k and the updated matching node r calculated using a breadth-first search algorithm, and r is any updated matching node in the recommendation topology network graph except k; The number of nodes connected to the updated matching node k, deg(k), is obtained, and the connectivity of the updated matching node k is deg(k); Ψk= Ψk+ αβτE k , where α is a centrality weight, β is an update weight, τ is a connectivity weight, α + β + τ = 1, E k is the accumulated update for matched node k after the update. A recommended score threshold value Ψ* is set, the value range of Ψ* is 0.4 to 0.6; if Ψ k ≥Ψ∗, the updated matching node k is taken as a core recommended node; updating the weight of the edge in the recommended topology network graph as cost(k,m), wherein E' m is the accumulated update amount of the matched node m after the update; A breadth-first search algorithm is used to calculate a core recommended node with the lowest path cost of each updated matching node m, and the core recommended node is taken as a node for finally feeding back a multi-modal recommended result to a user; At a target time, all core recommended nodes control the multi-modal recommended result to be fed back to the user, and the multi-modal recommended result includes at least two of a legal article text, a case document, a process visual chart, and a voice interpretation. 8.The method of claim 1, wherein: The acquisition of the user multi-modal features includes: A user consultation text is acquired through a text input unit, and a text feature is extracted, and the text feature includes a keyword, a legal field term, and a sentence semantic vector; A user consultation voice is acquired through a voice acquisition unit, and a voice feature is extracted, and the voice feature includes a speech speed, a tone, and an emotion feature; An evidence image uploaded by the user is acquired through an image acquisition unit, and an image feature is extracted, and the image feature includes text information and an image content semantic vector; The feature extraction model includes a text feature extraction model, a voice feature extraction model, and an image feature extraction model; the text feature extraction model adopts a BERT model, the voice feature extraction model adopts an MFCC+CNN model, and the image feature extraction model adopts a ResNet+OCR model.

9. The intelligent consulting system based on dynamic legal knowledge graph and multi-modal recommendation, characterized in that: It includes: A dynamic knowledge graph construction module is configured to construct a dynamic legal knowledge graph, select a plurality of knowledge nodes in a legal knowledge space, and establish a knowledge correlation three-dimensional coordinate system; A user demand acquisition module is configured to acquire user consultation demands and user multi-modal features, and measure feature vectors of the user multi-modal features in the knowledge correlation three-dimensional coordinate system using a feature extraction model; A demand matching module is configured to acquire an associated law vector of each knowledge node, calculate a matching degree by executing a demand perception strategy, and divide core matching nodes and candidate matching nodes by executing a demand matching strategy; A knowledge update optimization module is configured to acquire a knowledge update priority of the candidate matching node, calculate a knowledge correlation distance, and obtain updated matching nodes by executing a knowledge update optimization strategy; A multi-modal recommendation module is configured to set a target time for feeding back a multi-modal recommended result, and execute a knowledge update estimation module to estimate an accumulated update amount; A recommended topology reconstruction module is configured to set an update amount threshold, execute a recommended topology reconstruction strategy to screen core recommended nodes, and reconstruct a recommended topology network graph; A main control module is electrically connected with the dynamic knowledge graph construction module, the user demand acquisition module, the demand matching module, the knowledge update optimization module, the multi-modal recommendation module, and the recommended topology reconstruction module, and is configured to control a working time sequence and data interaction of the modules.

10. The intelligent consulting system based on dynamic legal knowledge graph and multi-modal recommendation according to claim 9, characterized in that: It includes: The dynamic knowledge graph construction module comprises a knowledge storage unit, an association construction unit, an update triggering unit and a coordinate mapping unit; The knowledge storage unit is used for storing node data of a law article layer, a case layer and a user consultation layer; The association construction unit is used for constructing a knowledge association layer; the update triggering unit is used for monitoring external legal data sources and triggering knowledge node updating; The coordinate mapping unit is used for mapping knowledge nodes to a knowledge association three-dimensional coordinate system to generate an association law vector; The user demand acquisition module comprises a text input unit, a voice collection unit, an image collection unit, a multi-modal feature extraction unit and a feature vector generation unit; the multi-modal feature extraction unit comprises a text feature extraction subunit, a voice feature extraction subunit and an image feature extraction subunit; and the feature vector generation unit is used for generating a feature vector of multi-modal features of a user.