Large model-based legal case recommendation method and system
By constructing a technical knowledge graph and using a temporal graph neural network and a variational autoencoder to generate joint query vectors, the problem of insufficient correlation between legal case recommendation results and technical facts in existing technologies is solved, thereby improving the technical relevance and reference value of recommended cases.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING NEW ORANGE TECH CO LTD
- Filing Date
- 2026-03-24
- Publication Date
- 2026-06-26
AI Technical Summary
Existing legal case recommendation methods based on large models suffer from insufficient correlation between the recommendation results and technical facts when dealing with technology-related intellectual property cases, thus limiting their reference value.
By constructing a technical knowledge graph, using a temporal graph neural network to generate pattern vectors and weight information, and combining it with a variational autoencoder to generate a latent space representation vector, the data is finally fused with legal text information in a large legal model to generate a joint query vector for case retrieval.
It enhances the technical relevance and reference value of legal case recommendation results, achieves deep integration and precise matching of technical features and legal dispute focus, and improves the representativeness and diversity of recommended cases.
Smart Images

Figure CN121901408B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intellectual property technology, and in particular to a legal case recommendation method and system based on a large model. Background Technology
[0002] The legal case recommendation method aims to provide similar cases with reference value for current pending cases by analyzing historical case data. This method shows good application prospects in improving judicial trial efficiency and promoting the uniformity of law application.
[0003] Existing legal case recommendation methods based on large models typically first perform semantic understanding of the case text, and then select historical cases from the case database that are similar to the description of the case to be queried as the recommendation result by calculating text similarity.
[0004] However, the adjudication of technology-related intellectual property cases heavily relies on the understanding of the technical solutions themselves. Such methods primarily focus on the surface semantic features of legal texts. When faced with cases requiring in-depth analysis of technical facts, the recommended results often deviate from the technical substance of the case, thus limiting the reference value of the recommended cases. Therefore, there is a technical problem in the existing technology of insufficient correlation between legal case recommendations and technical facts. Summary of the Invention
[0005] This application provides a legal case recommendation method and system based on a large model to solve the problem of low accuracy in the correlation between case recommendation results and technical facts in the prior art.
[0006] To address the aforementioned technical problems, firstly, this application provides a legal case recommendation method based on a large model, including:
[0007] Acquire document data from multiple intellectual property cases, user operation sequences corresponding to the technical solutions to be analyzed, and legal text information of the cases to be queried;
[0008] Based on the document data, a technology knowledge graph is constructed;
[0009] The technical knowledge graph and the user operation sequence are input into a pre-trained temporal graph neural network. The temporal graph neural network processes the technical knowledge graph to generate pattern vectors and analyzes the user operation sequence to generate weight information.
[0010] Based on the pattern vector and the weight information, technology association data is generated, and the technology association data is processed using a variational autoencoder to generate a latent space representation vector. The latent space representation vector is then processed to obtain enhanced technology feature data.
[0011] The enhanced technical feature data and the legal text information are input into a pre-trained legal big data model. The legal big data model then fuses the enhanced technical feature data and the legal text information to generate a joint query vector. The joint query vector is then used to perform case retrieval to generate similar case recommendation results.
[0012] Secondly, this application provides a legal case recommendation system based on a large model, including:
[0013] The acquisition module is used to acquire document data from multiple intellectual property cases, user operation sequences corresponding to the technical solutions to be analyzed, and legal text information of the cases to be queried.
[0014] A construction module is used to construct a technology knowledge graph based on the document data;
[0015] The input module is used to input the technology knowledge graph and the user operation sequence into a pre-trained time-series graph neural network, process the technology knowledge graph through the time-series graph neural network to generate pattern vectors, and analyze the user operation sequence to generate weight information;
[0016] The generation module is used to generate technology association data based on the pattern vector and the weight information, process the technology association data using a variational autoencoder to generate a latent space representation vector, and process the latent space representation vector to obtain enhanced technical feature data.
[0017] The fusion module is used to input the enhanced technical feature data and the legal text information into a pre-trained legal big data model, and to perform fusion processing on the enhanced technical feature data and the legal text information through the legal big data model to generate a joint query vector. The joint query vector is then used to perform case retrieval to generate similar case recommendation results.
[0018] Thirdly, this application provides an electronic device, comprising:
[0019] Memory, used to store computer programs;
[0020] A processor is configured to implement the steps of the large-model-based legal case recommendation method as described in the first aspect above when executing the computer program.
[0021] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of the large-model-based legal case recommendation method described in the first aspect above.
[0022] The technical solution provided in this application has the following beneficial effects:
[0023] This application provides a multi-source input foundation for subsequent analysis by acquiring document data, user operation sequences, and legal text information from intellectual property cases. Then, it constructs a technology knowledge graph based on the document data, organizing the scattered technical information into a structured knowledge network. Next, it inputs the technology knowledge graph and user operation sequences into a time-series graph neural network to generate pattern vectors that represent the technology development path and weight information that reflects the degree of technology attention, thereby achieving in-depth mining of the laws of technology evolution and user operation intentions.
[0024] Subsequently, technical association data is generated based on pattern vectors and weight information, and enhanced technical feature data is obtained by processing it using a variational autoencoder, thus optimizing the expression of technical features. Finally, the enhanced technical feature data and legal text information are input into a legal big data model for fusion processing, generating a joint query vector and performing case retrieval to obtain similar case recommendation results that match the technical substance and legal disputes of the case to be queried, thereby improving the technical relevance and reference value of the recommended cases.
[0025] Furthermore, this application inputs the enhanced technical feature data into the first embedding layer of the legal big data model to obtain a technical vector, and simultaneously inputs legal text information into the second embedding layer to obtain a text vector. Then, based on the technical vector and text vector, a joint query vector is generated through multiple internal structures of the legal big data model. The cosine similarity between the joint query vector and the vectors of each case in the case library is calculated and ranked to select a candidate set. Finally, the candidate set is clustered according to the technical field of the cases, and the case with the highest similarity in each group is selected to generate a case recommendation result. This process achieves deep integration and accurate matching of technical features and legal dispute focus, effectively improving the representativeness and diversity of recommended cases while ensuring the technical relevance of the recommendation results.
[0026] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 A flowchart illustrating a legal case recommendation method based on a large model, provided as an embodiment of this application;
[0029] Figure 2A schematic diagram illustrating a specific implementation of a legal case recommendation method based on a large model, provided in this application embodiment;
[0030] Figure 3 This is a schematic diagram of the structure of a legal case recommendation system based on a large model, provided as an embodiment of this application. Detailed Implementation
[0031] To address the problems existing in the prior art, this application proposes a legal case recommendation method based on a large model. This method constructs a technical knowledge network, integrates user operation intentions, and deeply integrates technical features and legal dispute points, enabling the recommendation results to simultaneously reflect the legal attributes and technical substance of the case. This effectively overcomes the deficiency of insufficient correlation between the case recommendation results and technical facts in the prior art, and improves the reference value and matching accuracy of the recommended cases in technical intellectual property cases.
[0032] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0033] The core of this application is to provide a legal case recommendation method based on a large model, and a flowchart of one specific implementation is shown below. Figure 1 As shown, the method includes:
[0034] Step 101: Obtain document data from multiple intellectual property cases, user operation sequences corresponding to the technical solutions to be analyzed, and legal text information of the cases to be queried.
[0035] In step 101, intellectual property cases refer to cases involving technical legal disputes such as patent infringement, trade secret disputes, and computer software copyright. The adjudication of these cases requires a deep understanding of the composition, feature comparison, and technological development of the technical solutions involved in the case. Document data refers to various technical materials related to historical intellectual property cases. This document data includes patent specifications, technical appraisal reports, and abstract syntax trees of software source code. These materials record the complete details of the technical solutions involved in the case.
[0036] The technical solution to be analyzed refers to the technical solution that needs to be analyzed during the current case discussion or the ascertainment of technical facts. This solution may be the technical content of the patent involved, the allegedly infringing technical solution, or the technical object that needs to be compared with the technology. The user operation sequence refers to the spatial motion flow data generated by the user in the process of operating the physical marker block on the interactive sandbox. This motion flow data includes displacement data, rotation data, and combination sequence data, which is used to characterize the user's understanding and decomposition process of the technical solution.
[0037] The case to be queried refers to the target case for which similar historical cases need to be obtained for reference. This case has specific legal disputes and technical solutions to be analyzed. It needs to be matched with historical precedents with reference value through the case recommendation method. The legal text information refers to the text describing the legal disputes of the case to be queried. This text records the core content of the dispute at the legal level.
[0038] In this embodiment of the application, document data of multiple intellectual property cases are obtained through a data interface. At the same time, user operation sequences are collected through an optical motion capture system deployed in an auxiliary case discussion space, and legal text information of the case to be queried is received through a text input interface. This completes the collection of three types of basic data, providing a data foundation for subsequent technical knowledge graph construction, user intent analysis, and the fusion processing of technical features and legal disputes.
[0039] Step 102: Construct a technology knowledge graph based on the document data.
[0040] Among them, the technology knowledge graph is a network model that organizes technical information in a graphical structure. The nodes of the graph are used to represent technical entities, and the edges of the graph are used to represent the relationship types between technical entities. The graph can reflect the evolution and correlation between different technical solutions.
[0041] In this embodiment, step 102 includes the following process:
[0042] Step 1021: Identify the technical entities in the document data, determine the relationship types between the technical entities, and connect the technical entities to form an initial structure based on the relationship types. The initial structure is used to describe a single technical solution.
[0043] In step 1021, a technical entity refers to a technical component extracted from document data. The technical entity includes component name, method steps, and effect description. The relationship type refers to the connection method between technical entities. The relationship type includes hierarchical relationship, temporal relationship, and causal conditional relationship. The initial structure refers to a directed network formed by connecting multiple technical entities according to their relationship types. This network completely describes the internal structure and implementation logic of a technical solution.
[0044] In this embodiment, firstly, entity recognition is performed on the document data using natural language processing technology to extract entity units representing technical components as technical entities; then, the extracted entity units are classified into relationships to determine the dependencies between entity units, including hierarchical relationships, temporal relationships, and causal relationships; finally, based on the determined dependencies, the entity units are linked into a local technical fact chain, which is used to describe the implementation process of a single technical solution, thereby obtaining the initial structure.
[0045] Step 1022: Based on the case identifier, merge the multiple initial structures describing the same intellectual property case to obtain an intermediate structure.
[0046] In step 1022, the case identifier is a unique coded information used to distinguish different intellectual property cases, and the identifier corresponds to the case information in the document data; the intermediate structure refers to the comprehensive network formed by merging multiple initial structures belonging to the same intellectual property case, and the network fully presents all the technical solutions involved in a single case.
[0047] In this embodiment of the application, multiple initial structures belonging to the same intellectual property case are identified based on the case identification information carried in the document data; then, the multiple identified initial structures are merged, the duplicate entity units are merged, and a unified network structure is constructed based on the connection relationship between the entity units, thereby obtaining an intermediate structure.
[0048] Step 1023: Based on the time data and citation data between intellectual property cases, determine the evolution type between multiple intermediate structures, and connect multiple intermediate structures based on the evolution type to obtain a technology knowledge graph.
[0049] In step 1023, time data refers to the application date or publication date information of intellectual property cases, citation data refers to the record information of mutual citation between cases, and evolution type refers to the category of development relationship between intermediate structures, which includes continuation relationship, bifurcation relationship and substitution relationship.
[0050] In this embodiment of the application, the time data and citation data of the intellectual property cases corresponding to each intermediate structure are first obtained; then, based on the time sequence and citation relationship of different cases, the evolution type between multiple intermediate structures is determined, including the continuation relationship, the bifurcation relationship and the substitution relationship; finally, based on the determined evolution type, multiple intermediate structures are connected across cases, and connecting edges are added to intermediate structures with evolution relationships, thereby constructing a technical knowledge graph.
[0051] This application constructs a technology knowledge graph, organizing technical information scattered across different case documents into a structured network, providing a systematic knowledge foundation for subsequent analysis of technology development paths and user operational intentions.
[0052] Step 103: Input the technology knowledge graph and the user operation sequence into a pre-trained temporal graph neural network, process the technology knowledge graph through the temporal graph neural network to generate pattern vectors, and analyze the user operation sequence to generate weight information.
[0053] The temporal graph neural network can adopt an encoder-decoder architecture. The encoder part includes a graph convolutional layer, a temporal memory layer, and a sequence encoding layer. The decoder part includes an attention computation layer and a path aggregation layer. The fully connected output layer serves as the final output module. The graph convolutional layer adopts a three-layer graph convolutional network structure, with each layer containing 64 hidden units. It uses the ReLU activation function and residual connections. This layer is used to aggregate the features of nodes and their neighbors. The temporal memory layer adopts a bidirectional long short-term memory network, containing two stacked LSTM layers. Each layer has a hidden state dimension of 128. This layer is used to capture the changes in node features over time. The sequence encoding layer adopts a gated recurrent unit network, containing two bidirectional GRU layers. The hidden layer dimension is 256. This layer is used to encode variable-length user operation sequences into fixed-length vectors.
[0054] The attention computation layer employs a scaled dot product attention mechanism, containing a multi-head attention module with 8 heads, each with a dimension of 64. This layer is used to calculate the correlation between the operation sequence vector and the temporal state of the nodes. The path aggregation layer uses a graph-walk-based path attention aggregation mechanism, including a path sampling module and a weight calculation module. This layer is used to calculate the overall path attention based on the node attention scores. The fully connected output layer contains three fully connected network layers with 512, 256, and 128 neurons, respectively. Dropout is used to prevent overfitting. This layer is used to integrate the temporal state sequences into a pattern vector.
[0055] This temporal graph neural network employs a two-stage training strategy. First, it undergoes unsupervised pre-training on a large graph dataset, using graph reconstruction loss and temporal prediction loss as pre-training objectives. Then, it undergoes supervised fine-tuning on a labeled dataset. The training data includes a technology knowledge graph, user operation sequences, and corresponding pattern vectors and weight information labels. Mean squared error is used as the loss function, and the Adam optimizer is employed. The initial learning rate is set to 0.001, the batch size is 32, the training epochs are 100, and an early stopping mechanism is used to prevent overfitting.
[0056] It should be noted that the above structure is exemplary. This application does not impose specific limitations on the internal structure design of the temporal graph neural network, and corresponding settings can be made according to the actual situation.
[0057] The pattern vector is a fixed-length numerical vector used to represent the overall characteristics of the technological development path in the technological knowledge graph; the weight information is a set of numerical values, each of which represents the degree of attention a user pays to a specific technological path in the technological knowledge graph.
[0058] In this embodiment, step 103 includes the following process:
[0059] Step 1031: Input the technology knowledge graph and the user operation sequence into the temporal graph neural network. Through the graph convolutional layer of the temporal graph neural network, aggregate the initial features of the nodes in the technology knowledge graph to obtain the aggregated features of the nodes. The aggregated features integrate the information of the adjacent nodes of the nodes.
[0060] In step 1031, the initial features of a node refer to the feature information carried by each node in the technology knowledge graph, which includes the node's type identifier and the technical entity content corresponding to the node; the neighboring nodes of a node refer to other nodes in the technology knowledge graph that are directly connected to the current node through edges; the aggregated features refer to the updated features obtained by fusing the initial features of the current node with the initial features of its neighboring nodes, which reflect the association information between the node and its neighboring nodes.
[0061] In this embodiment, the constructed technical knowledge graph and the collected user operation sequences are first input into a pre-trained temporal graph neural network. Then, the technical knowledge graph is processed through the graph convolutional layer of the temporal graph neural network. In the graph convolutional layer, the initial features of each node are traversed. For each current node, the initial features of all its neighboring nodes are collected. The initial features of these neighboring nodes are weighted and summed with the initial features of the current node to obtain the aggregated features of the node. The aggregated features integrate the information of the node itself and the information of its neighboring nodes, laying the foundation for subsequent analysis of the correlation between technical features.
[0062] In practical applications, taking a patent infringement case involving a stirring device as an example, the technical knowledge graph contains a node A representing a "stirring device" with initial characteristics of [1, 0, 0]. The adjacent nodes of node A include node B representing a "drive motor" and node C representing a "drive shaft". The initial characteristics of node B are [0, 1, 0] and the initial characteristics of node C are [0, 0, 1]. In the graph convolutional layer, the aggregated feature of node A is obtained by weighted summation of the initial features of nodes A, B, and C, where the weight of node A is 0.6, the weight of node B is 0.2, and the weight of node C is 0.2. The calculation process is 0.6×[1, 0, 0]+0.2×[0, 1, 0]+0.2×[0, 0, 1]=[0.6, 0.2, 0.2]. This aggregated feature [0.6, 0.2, 0.2] is the feature representation of node A after fusing the information of its neighboring nodes. This feature reflects the technical relationship between the stirring device and the drive motor and transmission shaft.
[0063] Step 1032: The aggregated features of the nodes are serialized through the time memory layer of the temporal graph neural network to obtain the temporal state sequence of the nodes. The temporal state sequence is used to record the change process of node features over time.
[0064] In step 1032, the time memory layer is a network module in the temporal graph neural network that is specifically designed to process time series data. This module can capture the changing patterns of node features at consecutive time points. The temporal state sequence refers to the sequence data formed by arranging the aggregated features of the same node at different time points in chronological order. Each element in the sequence corresponds to the aggregated feature of the node at a time point.
[0065] In this embodiment, the aggregated features of each node obtained in step 1031 are input into the time memory layer of the temporal graph neural network. In this time memory layer, for the same node, its aggregated features at multiple time points are arranged in chronological order of technological evolution to form the temporal state sequence of the node. Through the loop computing unit inside the time memory layer, the features of each time point in the temporal state sequence are processed and the hidden state of the previous time point is passed. Finally, the complete temporal state sequence of each node after time modeling is output, which reveals the evolution law of technological features at different time points.
[0066] In practical applications, following the above case, for node A, i.e., the stirring device node, its aggregation characteristics at three different patent application time points are [0.6, 0.2, 0.2] in 2018, [0.5, 0.3, 0.2] in 2020, and [0.4, 0.4, 0.2] in 2022. These aggregated features are input into the time memory layer in chronological order. First, the [0.6, 0.2, 0.2] time point of 2018 is processed to obtain the hidden state h1. Then, h1 is combined with the [0.5, 0.3, 0.2] time point of 2020 to obtain the hidden state h2. Finally, h2 is combined with the [0.4, 0.4, 0.2] time point of 2022 to obtain the hidden state h3. The final output temporal state sequence of node A is {[0.6, 0.2, 0.2], [0.5, 0.3, 0.2], [0.4, 0.4, 0.2]}, which reflects the evolution of the technical features of the stirring device over time.
[0067] Step 1033: Integrate the temporal state sequence through the fully connected output layer of the temporal graph neural network to generate a pattern vector.
[0068] In step 1033, the fully connected output layer is the network layer at the end of the temporal graph neural network, which maps multiple input features into a fixed-length output vector.
[0069] In this embodiment of the application, the temporal state sequence of all nodes obtained in step 1032 is input into the fully connected output layer of the temporal graph neural network. In the fully connected output layer, the temporal state sequence of all nodes is first concatenated into a long vector, and then the long vector is compressed and mapped through multiple nonlinear transformations. Finally, a fixed-dimensional pattern vector is output. This pattern vector is used to characterize the overall features of the technological development path reflected by the technological knowledge graph, providing a global view of the technology side for subsequent integration with legal text.
[0070] In practical applications, continuing the above case, assume that there are three nodes A, B, and C in the technical knowledge graph, corresponding to the stirring device, drive motor, and transmission shaft, respectively. The temporal state sequence of each node is a feature vector at three time points. Then, the temporal state sequences of these three nodes are concatenated into a total vector with a dimension of 3×3×3=27. This 27-dimensional total vector is then input into a fully connected output layer. This fully connected output layer contains two hidden layers: the first hidden layer has 64 neurons, the second hidden layer has 32 neurons, and the output layer has 128 neurons. Finally, after layer-by-layer calculation, a 128-dimensional pattern vector is output, which is [0.12, 0.35, 0.67, ..., 0.42]. This vector comprehensively represents the development path characteristics of the stirring device technology field.
[0071] Step 1034: Encode the user operation sequence through the sequence encoding layer of the time-series graph neural network to obtain the operation sequence vector.
[0072] In step 1034, the sequence coding layer is a network module in the temporal graph neural network that is specifically designed to process input sequence data. This module converts variable-length operation sequences into fixed-length vector representations. The operation sequence vector is a numerical vector that represents the semantic information and structural features of the entire user operation sequence.
[0073] In this embodiment, the collected user operation sequence is input into the sequence encoding layer of a temporal graph neural network. In this sequence encoding layer, each operation action in the user operation sequence is first converted into a corresponding embedding vector, which corresponds to the specific operation in the technical solution demonstration process. Then, these embedding vectors are processed sequentially by a recurrent neural network to capture the temporal dependencies between the operation actions. Finally, the hidden states of all time steps are summarized to generate a fixed-length operation sequence vector, which fully represents the user's overall intention in understanding and decomposing the technical solution.
[0074] In practical applications, taking the judge's operation of the mixing device's technical solution during case discussion as an example, the user's operation sequence includes five actions: moving the identifier block A representing the mixing device, rotating the identifier block B representing the drive motor, combining identifier blocks A and B to indicate the assembly relationship, disassembling and combining to indicate the separation of technical features, and moving the identifier block C representing the drive shaft. In the sequence encoding layer, each operation action is first mapped to a 128-dimensional embedding vector, resulting in five embedding vectors. These five embedding vectors are then sequentially input into a Long Short-Term Memory (LSTM) network containing 256 hidden units. After calculation over five time steps, the hidden state of the last time step is output as the operation sequence vector. This operation sequence vector is a 256-dimensional numerical vector [0.23, 0.56, 0.78, ..., 0.34], which represents the judge's understanding of the mixing device's technical solution.
[0075] Step 1035: Calculate the correlation between the operation sequence vector and the temporal state sequence of each node in the technical knowledge graph through the attention calculation layer in the temporal graph neural network to obtain the attention score.
[0076] In step 1035, the attention calculation layer is a network module in the temporal graph neural network used to calculate the degree of correlation between vectors. This module outputs an attention score. The attention score is a set of values, where each value represents the degree of correlation between the operation sequence vector and the temporal state sequence of a certain node. The larger the value, the stronger the correlation, that is, the higher the attention of the user's operation intention to the technology node.
[0077] In this embodiment, the temporal state sequence of each node in the technical knowledge graph obtained in step 1033 and the operation sequence vector obtained in step 1034 are simultaneously input into the attention calculation layer of the temporal graph neural network. In this attention calculation layer, the temporal state sequence of each node is first summarized to obtain the summary feature of each node. Then, the operation sequence vector is multiplied by the summary feature of each node to obtain the initial association value of each node. Finally, the initial association values of all nodes are normalized to obtain the attention score of each node. The attention score reflects the degree of attention of the user's operation intention to each technical node, providing a basis for determining the technical path weight in the future.
[0078] In practical applications, following the above case, the technical knowledge graph contains three nodes. The summary features of the timing state sequence of node A, the stirring device, are [0.4, 0.4, 0.2]. The summary features of node B, the drive motor, are [0.3, 0.5, 0.2]. The summary features of node C, the transmission shaft, are [0.2, 0.3, 0.5]. The operation sequence vector is [0.23, 0.56, 0.78].
[0079] In the attention computation layer, the dot product of the operation sequence vector and the summative feature of node A is calculated first, i.e., 0.23×0.4+0.56×0.4+0.78×0.2=0.092+0.224+0.156=0.472; then the dot product with node B is calculated, i.e., 0.23×0.3+0.56×0.5+0.78×0.2=0.069+0.28+0.156=0.505; and then the dot product with node C is calculated, i.e., 0.23×0.2+0.56×0.3+0.78×0.5=0.046+0.168+0.39=0.604. Finally, the three initial correlation values of 0.472, 0.505, and 0.604 were normalized, and the normalized attention scores were 0.298, 0.319, and 0.383, respectively. These scores indicate that the judge's operational intentions paid the highest attention to the drive shaft node.
[0080] Step 1036: Through the path aggregation layer in the temporal graph neural network, calculate the comprehensive attention value on the connection path based on the attention score and the connection relationship in the technology knowledge graph, and generate weight information based on the comprehensive attention value.
[0081] In step 1036, the path aggregation layer is a network module in the temporal graph neural network used to aggregate path information. This module outputs weight information. The connection path refers to the sequence formed by connecting multiple nodes through edges in the technical knowledge graph. This sequence corresponds to the feature combination or technical evolution path in the technical solution. The comprehensive attention value refers to the value obtained by aggregating the attention scores of each node on the path according to certain rules. This value is used to represent the comprehensive attention level of the entire path.
[0082] In this embodiment, the attention score of each node obtained in step 1035 and the technology knowledge graph itself are input into the path aggregation layer of the temporal graph neural network. In the path aggregation layer, all possible connection paths in the technology knowledge graph are traversed first. These paths correspond to the combination relationship between technology features or the technology evolution route. For each path, the attention scores of all nodes on the path are collected. Then, these attention scores are weighted and summed or averaged to obtain the comprehensive attention value of the path. Finally, the comprehensive attention values of all paths are combined into a set, which is the weight information. The weight information is used to characterize the degree of user attention to each technology path in the technology knowledge graph, providing path-level weight guidance for the subsequent generation of technology-related data.
[0083] In practical applications, following the above example, the technical knowledge graph contains three connection paths: Path 1 is from node A of the stirring device to node B of the drive motor, representing the combination relationship between the stirring device and the drive motor; Path 2 is from node A of the stirring device to node C of the drive shaft, representing the combination relationship between the stirring device and the drive shaft; Path 3 is from node B of the drive motor to node C of the drive shaft, representing the coordination relationship between the drive motor and the drive shaft. The attention score of node A is 0.298, the attention score of node B is 0.319, and the attention score of node C is 0.383. In the path aggregation layer, the comprehensive attention value of path 1 is calculated as the average of the attention scores of nodes A and B, i.e., (0.298 + 0.319) ÷ 2 = 0.3085.
[0084] The comprehensive attention value for path two is the average of the attention scores of nodes A and C, i.e., (0.298 + 0.383) ÷ 2 = 0.3405; the comprehensive attention value for path three is the average of the attention scores of nodes B and C, i.e., (0.319 + 0.383) ÷ 2 = 0.351. These three comprehensive attention values are combined to form weight information, which is {0.3085, 0.3405, 0.351}. This information indicates that the judge paid the highest attention to the path of the drive motor and transmission shaft interaction, providing a path weight basis for the subsequent generation of technical correlation data.
[0085] This application uses a temporal graph neural network to collaboratively process technical knowledge graphs and user operation sequences, generating pattern vectors that represent the path of technological development and weight information that reflects user attention intentions. This provides accurate technical input for the subsequent deep integration of technical features and legal texts, thereby improving the accuracy of the correlation between legal case recommendation results and technical facts.
[0086] Step 104: Based on the pattern vector and the weight information, generate technology association data, process the technology association data using a variational autoencoder to generate a latent space representation vector, and process the latent space representation vector to obtain enhanced technology feature data.
[0087] Among them, technology-related data refers to data obtained by combining pattern vectors and weight information. This data integrates the overall characteristics of the technology development path and the degree of user attention to specific technology paths.
[0088] The latent space representation vector refers to the vector representation obtained by mapping technology-related data to a low-dimensional latent space through the encoder of a variational autoencoder. This vector captures the core feature information in the technology-related data. The enhanced technology feature data refers to the optimized feature data obtained by further processing the latent space representation vector. This data has stronger expressive and discriminative power.
[0089] This application does not impose specific limitations on the model type, internal structure design, parameter design, training process, etc. of the variational autoencoder, and can be set accordingly based on the actual situation.
[0090] In this embodiment, step 104 includes the following process:
[0091] Step 1041: The pattern vector and the weight information are weighted and concatenated to form technical association data.
[0092] In this embodiment of the application, the pattern vector and weight information generated in step 103 are first obtained. Then, the pattern vector and weight information are weighted and concatenated. That is, during the concatenation process, the pattern vector and weight information are respectively assigned a preset fusion weight. The two are combined into a unified data structure through weighted calculation to obtain the technology-related data. This technology-related data provides a comprehensive input that integrates the global technology evolution law and the local user attention intent for the subsequent variational autoencoder processing.
[0093] Step 1042: Input the technology-related data into the encoder of the variational autoencoder, and perform nonlinear mapping on the technology-related data through the first fully connected layer of the encoder to obtain the first intermediate feature.
[0094] In step 1042, the encoder of the variational autoencoder refers to the neural network part of the variational autoencoder responsible for mapping the input data to the latent space. The encoder consists of multiple fully connected layers. The first fully connected layer is the first fully connected neural network layer in the encoder, which performs linear transformation and nonlinear activation on the input data. The first intermediate feature refers to the intermediate output data obtained after processing by the first fully connected layer. This data is a preliminary abstract representation of the original technical correlation data.
[0095] In this embodiment of the application, the technology-related data obtained in step 1041 is input into the encoder part of a pre-trained variational autoencoder. In the encoder, it first passes through a first fully connected layer. The first fully connected layer performs matrix multiplication with the technology-related data through a weight matrix, then adds a bias term, and then activates it through a nonlinear activation function to obtain a first intermediate feature. The first intermediate feature is the preliminary feature extraction result of the technology-related data.
[0096] Step 1043: Process the first intermediate feature through the second fully connected layer of the encoder to generate a mean parameter vector and a variance parameter vector, and perform reparameterized sampling based on the mean parameter vector and the variance parameter vector to obtain the latent space representation vector.
[0097] In step 1043, the second fully connected layer is a neural network layer in the encoder used to generate distribution parameters. The mean parameter vector is a vector composed of the mean parameters of the latent spatial distribution, which describes the central location of the latent spatial distribution; the variance parameter vector is a vector composed of the variance parameters of the latent spatial distribution, which describes the degree of dispersion of the latent spatial distribution.
[0098] In this embodiment, the first intermediate feature obtained in step 1042 is input to the second fully connected layer of the encoder. The mean parameter vector and variance parameter vector are generated by the calculation of the second fully connected layer. These two vectors together describe the distribution characteristics of the technology association data in the latent space. Then, reparameterization sampling is performed based on the generated mean parameter vector and variance parameter vector. That is, a specific vector is randomly sampled from the normal distribution described by the mean parameter vector and variance parameter vector. This vector is the latent space representation vector, which is a low-dimensional dense representation of the technology association data.
[0099] Step 1044: Input the latent space representation vector into the attention mechanism layer, calculate the self-attention weights of each feature dimension in the latent space representation vector through the query-key value calculation module of the attention mechanism layer, and perform weighted fusion on the latent space representation vector based on the self-attention weights to obtain the attention weighted vector.
[0100] In step 1044, the attention mechanism layer refers to the neural network layer built based on the attention mechanism. This layer can automatically learn the importance of each part in the input data and is a structure independent of the variational autoencoder. The query-key value calculation module is the core calculation unit in the attention mechanism layer. This module determines the attention weight by calculating the similarity between the query vector and the key vector.
[0101] Self-attention weights refer to the attention scores calculated between different feature dimensions within the same vector, which reflect the mutual importance between the feature dimensions. Attention-weighted vectors refer to the new vector obtained by weighting and fusing the original vector according to the self-attention weights. This vector strengthens the important feature dimensions and suppresses the secondary feature dimensions.
[0102] In this embodiment, the latent space representation vector obtained in step 1043 is input to the attention mechanism layer. In the attention mechanism layer, the latent space representation vector is first processed by the query-key value calculation module, which maps the vector into a query matrix, a key matrix, and a value matrix. Then, the dot product of the query matrix and the key matrix is calculated and normalized to obtain the self-attention weight. The self-attention weight represents the correlation strength between each feature dimension in the latent space representation vector. Then, the value matrix is weighted and summed based on the calculated self-attention weight to obtain the attention weighted vector, which is an optimized version of the latent space representation vector.
[0103] Step 1045: Adjust the dimension of the attention weighting vector through the linear projection layer of the attention mechanism layer to output the enhanced technical feature data.
[0104] In step 1045, the linear projection layer refers to the fully connected layer at the end of the attention mechanism layer, which performs a linear transformation on the input vector to adjust its dimension.
[0105] In this embodiment of the application, the attention weighting vector obtained in step 1044 is input to the linear projection layer of the attention mechanism layer. The dimension of the attention weighting vector is adjusted to the preset target dimension through matrix transformation of the linear projection layer, thereby outputting enhanced technical feature data. This enhanced technical feature data serves as the technical input for subsequent legal big model fusion processing.
[0106] This application uses a variational autoencoder to model the latent space of technically related data and combines an attention mechanism to enhance the latent representation, resulting in enhanced technical feature data that is more expressive, providing high-quality technical feature input for subsequent deep integration with legal text information.
[0107] Step 105: Input the enhanced technical feature data and the legal text information into the pre-trained legal big data model. The legal big data model fuses the enhanced technical feature data and the legal text information to generate a joint query vector. The joint query vector is then used to perform case retrieval to generate similar case recommendation results.
[0108] The legal big model uses the Transformer architecture as its basic skeleton. Its encoder part is composed of 12 stacked Transformer blocks. Each Transformer block contains a multi-head self-attention sub-layer and a feedforward neural network sub-layer. The multi-head self-attention sub-layer has 12 attention heads, each with a dimension of 64. The feedforward neural network sub-layer contains two fully connected layers with an intermediate hidden layer dimension of 3072. It uses the GELU activation function and layer normalization technology.
[0109] The model's first and second embedding layers are both word embedding layers with a word embedding dimension of 768. It employs learnable positional encoding and supports a maximum sequence length of 512. The cross-attention module uses a bidirectional cross-attention mechanism, containing eight cross-attention heads, each with a dimension of 96. This module is used to achieve bidirectional interaction between technical vectors and text vectors.
[0110] The gated recurrent unit network (GRU) employs a two-layer bidirectional stacked structure with 256 hidden units per layer. It uses the tanh activation function and the sigmoid gating function to capture temporal dependencies in interactive data. The capsule network consists of a main capsule layer and digital capsule layers. The main capsule layer has 32 capsule units, each outputting a 16-dimensional vector. The digital capsule layers also have 16 capsule units, each outputting a 32-dimensional vector. A dynamic routing algorithm iteratively updates the coupling coefficients between capsules three times.
[0111] The multilayer perceptron contains three fully connected layers with 1024, 512, and 256 neurons in each layer, respectively. It uses the ReLU activation function and Dropout regularization, with the Dropout rate set to 0.1.
[0112] This large-scale legal model employs a two-stage training strategy. The first stage involves unsupervised pre-training on massive amounts of general legal text data, using masked language modeling as the pre-training task. The optimizer is AdamW, with a learning rate of 5e-5, a batch size of 64, and 10 training epochs. The second stage involves supervised fine-tuning on labeled technical intellectual property case data. The training data includes enhanced technical feature data, legal text information, and corresponding case labels. A contrastive learning loss function is used, with the optimizer Adam, an initial learning rate of 2e-5, a batch size of 32, and 5 training epochs. An early stopping mechanism and model checkpoints are employed to save the best model.
[0113] It should be noted that the above structure is exemplary. This application does not impose specific limitations on the internal structure design corresponding to the legal big model, and corresponding settings can be made according to the actual situation.
[0114] The joint query vector refers to the vector representation generated by deeply integrating technical features and legal text. This vector contains both technical and legal information and is used for retrieval in the case database. The similar case recommendation result refers to the list of historical cases similar to the case to be queried, which is retrieved based on the joint query vector.
[0115] In this embodiment, step 105 includes the following process, such as... Figure 2 As shown:
[0116] Step 1051: Input the enhanced technical feature data into the first embedding layer of the legal big model to obtain a technical vector, which is used to represent the distribution of technical features in the semantic space.
[0117] In step 1051, the first embedding layer is a special embedding layer in the legal big model used to process technical feature data. This layer maps the input technical feature data to a continuous vector space. The technical vector refers to the vector representation obtained after processing by the first embedding layer. This vector corresponds to the positional distribution of technical features in the semantic space.
[0118] In this embodiment of the application, the enhanced technical feature data obtained in step 104 is first input into the first embedding layer of the legal big model. In the first embedding layer, the enhanced technical feature data is mapped into a dense vector representation through an embedding matrix, thereby obtaining a technical vector. This technical vector corresponds to the distribution position of the technical features in the semantic space.
[0119] In practical applications, taking the aforementioned patent infringement case involving a stirring device as an example, the enhanced technical feature data output in step 104 is a 128-dimensional vector. This vector is input into the first embedding layer of the legal big model. The first embedding layer contains a 128×256 embedding matrix. A 256-dimensional technical vector is obtained through matrix multiplication. This technical vector is [0.23, 0.45, 0.67, ..., 0.89].
[0120] Step 1052: Input the legal text information into the second embedding layer of the legal big model to obtain a text vector, which is used to represent the distribution of the focus of legal disputes in the semantic space.
[0121] In step 1052, the second embedding layer is a special embedding layer in the legal big model that is used to process legal text information. This layer converts the input legal text information into a vector representation. The text vector refers to the vector representation obtained after processing by the second embedding layer. This vector corresponds to the distribution position of the focus of legal disputes in the semantic space.
[0122] In this embodiment of the application, the legal text information of the case to be queried is input into the second embedding layer of the legal big model. In the second embedding layer, the legal text information is first segmented into words, and then the identifier of each word is mapped to the corresponding word embedding vector. Then, multiple word embedding vectors are integrated into a fixed-length text vector through pooling or concatenation operations. This text vector corresponds to the distribution position of the focus of legal disputes in the semantic space.
[0123] In practical applications, following the above case, the legal text information of the case to be queried is "whether the stirring device falls within the scope of patent protection". This legal text information is input into the second embedding layer of the legal big model. The second embedding layer first segments the text into words such as "stirring device", "whether", "falls within", and "scope of protection". Then, each word is mapped to a 256-dimensional word embedding vector. Finally, a 256-dimensional text vector is obtained through average pooling. This text vector is [0.12, 0.34, 0.56, ..., 0.78].
[0124] Step 1053: Generate a joint query vector based on the technical vector and the text vector through the multiple internal structures of the legal big model.
[0125] Step 1053 may specifically include the following steps:
[0126] A1: Input the technology vector and the text vector into the cross-attention module of the legal big data model. In the cross-attention module, bidirectional interactive calculation is performed based on the technology vector and the text vector to generate interactive data. The interactive data is used to represent the relationship between technical features and legal dispute points.
[0127] In step A1, the cross-attention module is a neural network module in the legal big model used to realize the interaction between two different modalities of data. This module calculates the mutual influence between technical vectors and text vectors through an attention mechanism. The interactive data refers to the data obtained after being processed by the cross-attention module, which integrates the correlation information between technical features and legal dispute focus.
[0128] In this embodiment, the technology vector obtained in step 1051 and the text vector obtained in step 1052 are input into the cross-attention module of the legal big data model. In this cross-attention module, the technology vector is first used as the query vector, and the text vector is used as the key vector and value vector to calculate the attention output of the legal text that the technology side focuses on. At the same time, the text vector is used as the query vector, and the technology vector is used as the key vector and value vector to calculate the attention output of the technology side that the legal text side focuses on. Then, the attention outputs of the two directions are concatenated or added to generate interactive data, which contains the bidirectional correlation between technical features and legal dispute focus.
[0129] In practical applications, continuing from the above example, a 256-dimensional technology vector and a 256-dimensional text vector are input into the cross-attention module, which contains eight attention heads. First, using the technology vector as the query vector and the text vector as the key and value vectors, the attention output from technology to text is calculated as a 256-dimensional vector [0.31, 0.52, 0.73, ..., 0.64]. Then, using the text vector as the query vector and the technology vector as the key and value vectors, the attention output from text to technology is calculated as a 256-dimensional vector [0.28, 0.49, 0.68, ..., 0.71]. Finally, these two vectors are concatenated to obtain 512-dimensional interactive data.
[0130] A2: Introduce a gated recurrent unit network to capture temporal dependency information during the interaction process based on the interaction data, so as to generate temporal augmentation data.
[0131] In step A2, the time-enhanced data refers to the data obtained after processing by the gated recurrent unit network, which enhances the time-series characteristics in the interactive data.
[0132] In this embodiment of the application, the interaction data obtained in step A1 is input into a gated recurrent unit network. The network serializes the interaction data through its internal update gate and reset gate mechanism, captures the implicit temporal dependencies, and generates temporally enhanced data, which is a temporally dimension-optimized version of the interaction data.
[0133] In practical applications, following the above example, 512-dimensional interactive data is input into a gated recurrent unit network. This network contains two stacked layers of bidirectional gated recurrent units, with 256 hidden units in each layer. After network processing, 256-dimensional time-series augmented data is output, which is [0.35, 0.58, 0.72, ..., 0.83].
[0134] A3: The temporal augmentation data is processed through the capsule network layer within the legal big model to generate structure-aware data.
[0135] In step A3, the capsule network layer is a neural network layer based on a capsule structure, which can capture the hierarchical structure and spatial relationships between features; the structure-aware data refers to the data obtained after processing by the capsule network layer, which can perceive the combined structural relationship between technical features and legal dispute points.
[0136] In this embodiment, the temporal augmentation data obtained in step A2 is input into a capsule network layer. In this capsule network layer, the temporal augmentation data is first decomposed into multiple capsule units, each capsule unit representing a combination of feature dimensions. Then, the coupling coefficient between capsules is calculated through a dynamic routing algorithm to update the output of the capsule units. Finally, the outputs of all capsule units are combined to generate structure-aware data, which can reflect the hierarchical relationship between technical features and legal dispute points.
[0137] In practical applications, continuing from the above case, 256-dimensional temporal augmentation data is input into a capsule network layer containing 32 capsule units, each outputting a 16-dimensional vector. After three iterations using a dynamic routing algorithm, 32 16-dimensional capsule output vectors are obtained. These vectors are then concatenated to obtain 512-dimensional structure-aware data.
[0138] A4: Using the multilayer perceptron of the legal big data model, feature transformation is performed on the structured perception data to generate a joint query vector.
[0139] In step A4, the multilayer perceptron is a feedforward neural network composed of multiple fully connected layers stacked together. This network is capable of performing nonlinear feature transformations on the input data.
[0140] In this embodiment of the application, the structure-aware data obtained in step A3 is input into a multilayer perceptron. The multilayer perceptron performs a layer-by-layer nonlinear transformation on the structure-aware data through multiple fully connected layers. After each layer undergoes a linear transformation, it is processed by an activation function and finally outputs a joint query vector with a fixed dimension. This joint query vector simultaneously integrates information on technical features and legal dispute points.
[0141] In practical applications, following the above example, 512-dimensional structure-aware data is input into a multilayer perceptron. This multilayer perceptron contains three fully connected layers. The first layer maps 512 dimensions to 256 dimensions, the second layer maps 256 dimensions to 128 dimensions, and the third layer maps 128 dimensions to 256 dimensions. After layer-by-layer calculation, a 256-dimensional joint query vector is output, which is [0.41, 0.63, 0.75, ..., 0.92].
[0142] Step 1054: Calculate the cosine similarity between the joint query vector and each case vector in the preset case library, and sort the cases from high to low based on the cosine similarity, and select the top-ranked cases as a candidate set.
[0143] In step 1054, cosine similarity is a similarity metric that measures the angle between two vectors. The closer the value is to 1, the more similar the two vectors are. The candidate set refers to the set of multiple cases with the highest similarity selected after sorting according to cosine similarity.
[0144] In this embodiment of the application, the cosine similarity is calculated between the joint query vector generated in step A4 and each case vector stored in the preset case library. For each case vector, the cosine value of the angle between it and the joint query vector is calculated to obtain a similarity score. Then, all cases are sorted from high to low according to the similarity score, and a preset number of cases with the highest ranking are selected as a candidate set. The cases in this candidate set are most similar to the case to be queried in the joint vector space.
[0145] In practical applications, following the above example, the case library contains 10,000 historical case vectors, each with 256 dimensions. The cosine similarity between the 256-dimensional joint query vector and each case vector is calculated, resulting in 10,000 similarity values. These cases are then sorted from highest to lowest similarity, and the top 50 cases are selected as a candidate set. The case with the highest similarity has a similarity value of 0.89, and the 50th-ranked case has a similarity value of 0.72.
[0146] Step 1055: Cluster the cases in the candidate set according to their corresponding technical fields, and select the case with the highest cosine similarity from each group to generate a case recommendation result.
[0147] In this embodiment, the technical field information of each case in the candidate set is first obtained, which can be obtained from the field tags pre-stored in the case library. Then, the cases in the candidate set are grouped according to the technical field, and cases belonging to the same technical field are grouped together. Next, within each technical field group, the case with the highest cosine similarity in the group is selected as the representative. Finally, the representative cases selected from all technical field groups are combined to generate the case recommendation result. This result ensures both the similarity between the recommended case and the case to be queried, and the representativeness of the recommended case in different technical fields.
[0148] In practical applications, following the above examples, the 50 cases in the candidate set belong to five different technical fields. Specifically, 15 cases belong to the field of stirring devices, 12 to the field of drive motors, 10 to the field of transmission shafts, 8 to the field of control systems, and 5 to the field of sealing structures. Within each technical field group, the cases with the highest cosine similarity were selected, resulting in five cases with similarity values of 0.89, 0.85, 0.83, 0.80, and 0.78, respectively. These five cases were then combined to form the recommended case study.
[0149] In this embodiment, after step 105, the following process is also included:
[0150] B1: Input the cases in the recommended case results into the causal reasoning model, and identify the causal logical chain between the technical facts and legal conclusions in the cases through the causal reasoning model.
[0151] In step B1, the causal reasoning model is an artificial intelligence model specifically designed to identify causal relationships. This model is able to analyze the causal relationship between technical facts and legal conclusions in a case. The causal logic chain refers to the logical path of how technical facts lead to a specific legal conclusion, and this path contains a series of causal relationships.
[0152] This application does not impose specific limitations on the model type, internal structure design, parameter design, training process, etc. of the causal reasoning model, and corresponding settings can be made according to the actual situation.
[0153] In this embodiment of the application, after generating the case recommendation results, each case in the case recommendation results is input into a pre-trained causal reasoning model. The model analyzes the description of technical facts and the statement of legal conclusions in the case to identify the causal relationship between the two, thereby extracting the causal logic chain that leads the technical facts to the legal conclusions. This causal logic chain can explain why a specific technical fact leads to a specific legal conclusion.
[0154] B2: Based on the aforementioned causal logic chain, a logical structure graph is constructed using a graph contrastive learning method.
[0155] In step B2, graph contrastive learning is a self-supervised learning method for learning graph structure representations; a logical structure graph refers to a network structure that graphically represents causal logical chains, where nodes represent technical facts or legal conclusions and edges represent causal relationships.
[0156] In this embodiment of the application, the causal logic chain of each case obtained in step B1 is input into the graph contrastive learning model. The model first represents each technical fact and legal conclusion in the causal logic chain as a node, and represents each causal relationship as a directed edge between nodes. Then, the graph is represented by the graph contrastive learning method to optimize the vector representation of the nodes. Finally, the logical structure graph corresponding to each case is output, which clearly shows the logical relationship between the technical facts and legal conclusions in the case.
[0157] B3: Based on the logical structure diagram, calculate the structural similarity between any two cases in the case recommendation results.
[0158] In step B3, structural similarity refers to the degree of similarity between two logical structure graphs in terms of topology and node attributes. This similarity is used to measure the consistency of the two cases at the level of logical reasoning.
[0159] In this embodiment of the application, the logical structure graphs of each case obtained in step B2 are compared pairwise. For any two cases, the structural similarity between them is calculated by a graph matching algorithm. This calculation process considers both the node similarity and edge similarity of the graph, thereby obtaining the degree of similarity between the two cases at the causal logic level.
[0160] B4: Based on the structural similarity, the case recommendation results are subjected to logical consistency screening and sorting optimization to generate optimized case recommendation results.
[0161] In step B4, logical consistency screening refers to the process of filtering recommended cases based on structural similarity, retaining cases with logical structures similar to the target cases; the optimized case recommendation result refers to the final recommendation list obtained after logical consistency screening and sorting optimization.
[0162] In this embodiment of the application, based on the structural similarity calculated in step B3, the cases in the case recommendation results are filtered, and cases whose logical structural similarity with the case to be queried reaches a preset threshold are retained; then, the filtered cases are reordered according to structural similarity, and cases with more similar logical structures are ranked first; finally, the optimized case recommendation results are output, which are similar not only at the level of technical features, but also at the level of causal logic.
[0163] This application uses a legal big data model to deeply integrate enhanced technical feature data with legal text information, generates joint query vectors and performs case retrieval, and then optimizes the logical consistency of the recommendation results through causal reasoning and graph comparison learning, finally obtaining similar case recommendation results that are both technically relevant and logically consistent.
[0164] Figure 3A schematic diagram of the structure of a legal case recommendation system based on a large model provided in this application embodiment, such as... Figure 3 As shown, the system includes:
[0165] The acquisition module 31 is used to acquire document data of multiple intellectual property cases, user operation sequences corresponding to the technical solutions to be analyzed, and legal text information of the cases to be queried.
[0166] Module 32 is used to construct a technology knowledge graph based on the document data.
[0167] The input module 33 is used to input the technology knowledge graph and the user operation sequence into a pre-trained temporal graph neural network, process the technology knowledge graph through the temporal graph neural network to generate pattern vectors, and analyze the user operation sequence to generate weight information.
[0168] The generation module 34 is used to generate technology association data based on the pattern vector and the weight information, process the technology association data using a variational autoencoder to generate a latent space representation vector, and process the latent space representation vector to obtain enhanced technology feature data.
[0169] The fusion module 35 is used to input the enhanced technical feature data and the legal text information into a pre-trained legal big model, and to perform fusion processing on the enhanced technical feature data and the legal text information through the legal big model to generate a joint query vector. The joint query vector is then used to perform case retrieval to generate similar case recommendation results.
[0170] The legal case recommendation system based on a large model in this application is used to implement the aforementioned legal case recommendation method based on a large model. Therefore, the specific implementation of the legal case recommendation system based on a large model can be found in the embodiment section of the legal case recommendation method based on a large model above. The specific implementation can be referred to the description of the corresponding embodiments, which will not be repeated here.
[0171] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described large-model-based legal case recommendation methods.
[0172] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described methods for recommending legal case types based on large models.
[0173] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory, random access memory, portable hard drives, magnetic disks, or optical disks.
[0174] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the embodiments of the legal case recommendation method based on a large model.
[0175] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0176] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0177] The foregoing has provided a detailed description of the legal case recommendation method and system based on a large model provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A legal case recommendation method based on a large model, characterized in that, include: Acquire document data from multiple intellectual property cases, user operation sequences corresponding to the technical solutions to be analyzed, and legal text information of the cases to be queried; Based on the document data, a technology knowledge graph is constructed; The technical knowledge graph and the user operation sequence are input into a pre-trained temporal graph neural network. The temporal graph neural network processes the technical knowledge graph to generate pattern vectors and analyzes the user operation sequence to generate weight information. Based on the pattern vector and the weight information, technology association data is generated, and the technology association data is processed using a variational autoencoder to generate a latent space representation vector. The latent space representation vector is then processed to obtain enhanced technology feature data. The enhanced technical feature data and the legal text information are input into a pre-trained legal big data model. The legal big data model is used to fuse the enhanced technical feature data and the legal text information to generate a joint query vector. The joint query vector is then used to perform case retrieval to generate similar case recommendation results. The enhanced technical feature data and the legal text information are input into a pre-trained legal big data model. The legal big data model then fuses the enhanced technical feature data and the legal text information to generate a joint query vector. This joint query vector is then used to perform case retrieval to generate similar case recommendation results, including: The enhanced technical feature data is input into the first embedding layer of the legal big model to obtain a technical vector, which is used to represent the distribution of technical features in the semantic space. The legal text information is input into the second embedding layer of the legal big model to obtain text vectors, which are used to represent the distribution of legal dispute focus in semantic space; Based on the technical vector and the text vector, a joint query vector is generated through the multiple internal structures of the legal big model. Calculate the cosine similarity between the joint query vector and each case vector in the preset case library, and sort the cases from high to low based on the cosine similarity, and select the top-ranked cases as a candidate set. The cases in the candidate set are clustered according to their corresponding technical fields, and the cases with the highest cosine similarity in each group are selected to generate similar case recommendation results.
2. The method according to claim 1, characterized in that, The process of generating a joint query vector based on the technical vector and the text vector, through multiple internal structures of the legal big model, includes: The technical vector and the text vector are input into the cross-attention module of the legal big data model. In the cross-attention module, bidirectional interactive calculations are performed based on the technical vector and the text vector to generate interactive data. The interactive data is used to represent the relationship between technical features and legal dispute points. A gated recurrent unit network is introduced to capture temporal dependency information during the interaction process based on the interaction data, so as to generate temporal augmentation data; The temporal augmentation data is processed through the capsule network layer within the aforementioned legal big model to generate structure-aware data; The structured perception data is transformed using the multilayer perceptron of the legal big data model to generate a joint query vector.
3. The method according to claim 1, characterized in that, The step of inputting the technology knowledge graph and the user operation sequence into a pre-trained temporal graph neural network, processing the technology knowledge graph through the temporal graph neural network to generate pattern vectors, and analyzing the user operation sequence to generate weight information includes: The technical knowledge graph and the user operation sequence are input into a temporal graph neural network. The initial features of the nodes in the technical knowledge graph are aggregated through the graph convolutional layer of the temporal graph neural network to obtain the aggregated features of the nodes. The aggregated features incorporate the information of the adjacent nodes of the nodes. The aggregated features of the nodes are serialized through the temporal memory layer of the temporal graph neural network to obtain the temporal state sequence of the nodes. The temporal state sequence is used to record the change process of node features over time. The temporal state sequence is integrated through the fully connected output layer of the temporal graph neural network to generate a pattern vector; The user operation sequence is encoded through the sequence encoding layer of the time-series graph neural network to obtain an operation sequence vector; The attention score is obtained by calculating the correlation between the operation sequence vector and the temporal state sequence of each node in the technical knowledge graph through the attention calculation layer in the temporal graph neural network. The path aggregation layer in the temporal graph neural network calculates the comprehensive attention value on the connection path based on the attention score and the connection relationship in the technology knowledge graph, and generates weight information based on the comprehensive attention value.
4. The method according to claim 1, characterized in that, Based on the pattern vector and the weight information, technology association data is generated, and the technology association data is processed using a variational autoencoder to generate a latent space representation vector. The latent space representation vector is then processed to obtain enhanced technology feature data, including: The pattern vector and the weight information are weighted and concatenated to form technical association data; The technology-related data is input into the encoder of the variational autoencoder, and the technology-related data is nonlinearly mapped through the first fully connected layer of the encoder to obtain the first intermediate feature. The first intermediate feature is processed by the second fully connected layer of the encoder to generate a mean parameter vector and a variance parameter vector, and reparameterized sampling is performed based on the mean parameter vector and the variance parameter vector to obtain a latent space representation vector. The latent space representation vector is input into the attention mechanism layer. The query-key value calculation module of the attention mechanism layer calculates the self-attention weights of each feature dimension in the latent space representation vector. The latent space representation vector is then weighted and fused based on the self-attention weights to obtain the attention weighted vector. The attention weighting vector is dimensionally adjusted by the linear projection layer of the attention mechanism layer to output enhanced technical feature data.
5. The method according to claim 1, characterized in that, The construction of a technology knowledge graph based on the document data includes: Identify the technical entities in the document data, determine the relationship types between the technical entities, and connect the technical entities based on the relationship types to form an initial structure, which is used to describe a single technical solution; Based on the case identifier, multiple initial structures describing the same intellectual property case are merged to obtain an intermediate structure; Based on the time data and citation data between intellectual property cases, the evolution types among multiple intermediate structures are determined, and based on the evolution types, multiple intermediate structures are connected to obtain a technology knowledge graph.
6. The method according to claim 1, characterized in that, After using the joint query vector to perform case retrieval and generate similar case recommendation results, the process also includes: The cases in the case recommendation results are input into the causal reasoning model, and the causal logical chain between the technical facts and legal conclusions in the cases is identified by the causal reasoning model. Based on the aforementioned causal logic chain, a logical structure graph is constructed using a graph contrastive learning method. Based on the logical structure diagram, calculate the structural similarity between any two cases in the case recommendation results; Based on the structural similarity, the case recommendation results are subjected to logical consistency screening and sorting optimization to generate optimized case recommendation results.
7. A legal case recommendation system based on a large model, characterized in that, include: The acquisition module is used to acquire document data from multiple intellectual property cases, user operation sequences corresponding to the technical solutions to be analyzed, and legal text information of the cases to be queried. A construction module is used to construct a technology knowledge graph based on the document data; The input module is used to input the technology knowledge graph and the user operation sequence into a pre-trained time-series graph neural network, process the technology knowledge graph through the time-series graph neural network to generate pattern vectors, and analyze the user operation sequence to generate weight information; The generation module is used to generate technology association data based on the pattern vector and the weight information, process the technology association data using a variational autoencoder to generate a latent space representation vector, and process the latent space representation vector to obtain enhanced technical feature data. The fusion module is used to input the enhanced technical feature data and the legal text information into a pre-trained legal big model, and to perform fusion processing on the enhanced technical feature data and the legal text information through the legal big model to generate a joint query vector. The joint query vector is then used to perform case retrieval to generate similar case recommendation results. The enhanced technical feature data and the legal text information are input into a pre-trained legal big data model. The legal big data model then fuses the enhanced technical feature data and the legal text information to generate a joint query vector. This joint query vector is then used to perform case retrieval to generate similar case recommendation results, including: The enhanced technical feature data is input into the first embedding layer of the legal big model to obtain a technical vector, which is used to represent the distribution of technical features in the semantic space. The legal text information is input into the second embedding layer of the legal big model to obtain text vectors, which are used to represent the distribution of legal dispute focus in semantic space; Based on the technical vector and the text vector, a joint query vector is generated through the multiple internal structures of the legal big model. Calculate the cosine similarity between the joint query vector and each case vector in the preset case library, and sort the cases from high to low based on the cosine similarity, and select the top-ranked cases as a candidate set. The cases in the candidate set are clustered according to their corresponding technical fields, and the cases with the highest cosine similarity in each group are selected to generate similar case recommendation results.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the large-model-based legal case recommendation method as described in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the large-model-based legal case recommendation method as described in any one of claims 1 to 6.