A method for generating context of conflict and dispute events

The causal logical chain is constructed through large language models and thinking chain paradigms, and the problems of artificial dependence and low efficiency in the analysis of contradictions and disputes are solved, efficient and accurate analysis of events is achieved, and strong technical support is provided.

CN118569389BActive Publication Date: 2024-11-22DATA SPACE RES INST
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411038866.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-22
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

In the analysis and handling of conflicts and disputes, the existing technology has problems such as manual operation dependence, high time and resource consumption, and it is difficult to deeply reveal the correlation and evolution process of events.

Method used

The large language model and thinking chain paradigm are adopted to collect and integrate text data, build causal logic chains, generate contexts of conflicts and disputes, and fine-tune the large model with LoRA method to optimize thinking chain capabilities to achieve in-depth analysis of events.

Benefits of technology

It has realized the efficient and accurate correlation and evolution process of conflicts and disputes, provided strong technical support for the resolution of conflicts and disputes, and improved the accuracy and efficiency of decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569389B_ABST
    Figure CN118569389B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating the context of conflict and dispute events, including: S1, creating a conflict and dispute event data set; S2, obtaining a structured conflict and dispute event data set; S3, annotating the large model data according to the structured conflict and dispute event data set, and constructing the annotation in the form of (q, a) question-answer pairs; S4, constructing a causal logic chain to understand and analyze conflict and dispute events; S5, after fine-tuning the large model for reasoning the context of conflict and dispute events, rewriting the input content of the newly input conflict and dispute event data set into a format that matches the format of the questions in the training data as the input of the large model, and the reasoning result of the large model will be used as the context of the conflict and dispute events. By integrating a large language model and a thinking chain paradigm, the present invention can efficiently and accurately reveal the correlation and evolution process between events, and provide strong technical support for the resolution of conflicts and disputes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of conflict and dispute analysis, and in particular to a method for generating the context of conflict and dispute events. Background Art

[0002] Conflicts and disputes are a common phenomenon in social life. Comprehensively and accurately grasping the ins and outs, influencing factors and internal logic of such events is of vital importance for event warning, arbitration and decision-making management. However, these events often involve a large amount of unstructured text data, such as police records, litigation documents and news reports. Traditional rule-based methods and statistical models have significant limitations in in-depth semantic understanding and complex reasoning.

[0003] At present, the analysis and handling of conflicts and disputes mainly rely on manual operations, which requires relevant personnel to have rich experience and professional knowledge and consumes a lot of time and resources. Since manual analysis is difficult to avoid the influence of subjectivity, it may lead to misunderstanding of the context of the dispute or omission of key information, thus affecting the accuracy of decision-making. In addition, although existing information technology tools have assisted in the handling of conflicts and disputes to a certain extent, most tools only provide data storage, retrieval and preliminary analysis functions, and lack the ability to deeply explore the context of complex events and systematically build them. Therefore, when faced with complex and changeable conflicts and disputes, existing technical means are often difficult to efficiently and accurately reveal the correlation and evolution process between events. Summary of the invention

[0004] One purpose of the present invention is to propose a method for generating the context of conflict and dispute events. By integrating a large language model and a thinking chain paradigm, the present invention can efficiently and accurately reveal the correlation and evolution process between events, and provide strong technical support for the resolution of conflicts and disputes.

[0005] A method for generating a context of a conflict and dispute event according to an embodiment of the present invention comprises the following steps:

[0006] S1. Collect text data related to conflict and dispute events, including judicial documents, police records and case materials, and systematically integrate the collected text data to create a conflict and dispute event dataset;

[0007] S2. Clean the integrated conflict and dispute event data set, remove duplicate, erroneous and incomplete data, perform desensitization on sensitive information in the cleaned conflict and dispute event data set, and group and classify it to obtain a structured conflict and dispute event data set;

[0008] S3. Label the big model data based on the structured conflict event data set. The labeling is constructed in the form of (q, a) question-answer pairs. During the big model training process, the question (q) in the question-answer pair is used as the input of the big model, and the answer (a) in the question-answer pair is used as the output of the big model.

[0009] S4. Generate and sort out the context of structured conflict and dispute event data sets with the help of big models. By establishing a causal chain, we can build a causal logic chain from the perspective of the causes and consequences and evolution of conflict and dispute events, and understand and analyze conflict and dispute events;

[0010] S5. After fine-tuning the big model for reasoning about the context of conflict and dispute events, rewrite the input content of the newly input conflict and dispute event data set to match the format of the question (q) in the training data as the input of the big model. The reasoning results of the big model will be used as the context of the conflict and dispute events. The contexts of different conflict and dispute events will be post-processed and visualized, and understood and analyzed.

[0011] Optionally, in the cleaned conflict and dispute event dataset, a collection strategy based on the persons involved is adopted to construct a structured conflict and dispute event dataset with the persons involved as the center. The structured conflict and dispute event dataset uses the persons involved as the basis for grouping the conflict and dispute event groups, and uses the identity card number or contact number of the persons as the unique identifier for grouping. After grouping, the structured conflict and dispute event dataset consists of multiple conflict and dispute event sets of the persons involved, and each conflict and dispute event set contains all conflict and dispute events related to the persons involved.

[0012] Optionally, S3 adopts a large model input construction method based on conflict and dispute events, and the input construction method is a combination of fixed prompt words and dynamic input event text, and the dynamic input event text is a structured conflict and dispute event data set centered on the person involved.

[0013] Optionally, the answer (a) in the question-answer pair may describe the relationship between conflict and dispute event i and conflict and dispute event j, explain why conflict and dispute event i is related to conflict and dispute event j, or how conflict and dispute event i leads to the occurrence of conflict and dispute event j.

[0014] Optionally, the S4 also includes fine-tuning the large model using the LoRA method, optimizing the large model's thinking chain ability when sorting out the context of conflicts and disputes, keeping the original pre-trained large model unchanged, and adding a bypass structure next to the large model. The bypass structure simulates the parameter update amount through low-rank decomposition and consists of two parts, A and B.

[0015] Optionally, the fine-tuning of the large model specifically includes:

[0016] Encode the input text data and convert the character representation into word embedding representation:

[0017] ;

[0018] in, represents the word embedding matrix, represents the embedding representation of the text sequence, , n represents the length of the text segment, and x represents the text characters;

[0019] Adding positional encoding information to each word embedding allows the large model to understand the position of the word in the sentence:

[0020] ;

[0021] ;

[0022] Among them, pos represents the position of word embedding, i represents the dimension index, represents the word embeddings at even positions, Represent word embeddings at odd positions;

[0023] Embedding words to represent and position encoding Add together to get the comprehensive representation ;

[0024] Construct model input and fix prompt words and dynamic input event text Combine to form the final input text data :

[0025] I=\left [ {T,H} \right ] ;

[0026] The final input text data After being sent to the large model, each Transformer of the large model uses the attention mechanism to calculate the attention score of each word embedding representation and other word embedding representations in the sequence. At the same time, LoRA introduces low-rank matrix A and low-rank matrix B. Low-rank matrix A and low-rank matrix B are added to the attention calculation layer of the large model to adjust the parameters of the large model:

[0027] ;

[0028] Among them, Q, K, V are the query, key, and value matrices in the attention mechanism. is the dimension of the key vector;

[0029] In Transformer, the attention scores are integrated using a feed-forward network after the attention calculation layer:

[0030] ;

[0031] in, , and , Represents the weights and biases of the feedforward network;

[0032] In each Transformer of the large model, the LoRA adaptation layer is used to fine-tune the parameters, and the gradient descent algorithm is used on the LoRA adaptation layer to update the low-rank matrix A and low-rank matrix B:

[0033] ;

[0034] ;

[0035] in, represents the learning rate, represents the loss function.

[0036] Optionally, during the fine-tuning training of the large model, the structure of the original large model remains unchanged, and only the low-rank matrix A and the low-rank matrix B are trained, while keeping the input and output dimensions of the large model consistent. In the initialization stage of the training, the low-rank matrix B is initialized using a random Gaussian distribution and initialized to an all-zero matrix to ensure that the bypass matrix remains in a zero state at the beginning of training. In the inference stage, the trained low-rank matrix A and low-rank matrix B are merged with the parameters of the original large model without adding additional inference time.

[0037] Optionally, the construction of the causal logic chain includes:

[0038] After the large model processes the text of conflict and dispute events through the attention mechanism and feedforward network, it generates the causal relationship matrix C between the conflict and dispute events. Each element in the causal relationship matrix C Indicates the causal relationship strength between conflict event i and conflict event j:

[0039] ;

[0040] in, represents the causal relationship strength between conflict event i and conflict event j, H represents the number of attention heads, T represents the time step, represents the query vector of the i-th event at the h-th attention head, represents the key vector of the j-th event at time step t, represents the value vector of the jth event at time step t, represents the element of the h-th row and t-th column of the low-rank matrix A, represents the element of the h-th row and t-th column of the low-rank matrix B;

[0041] Based on the causal relationship matrix C, the causal logic chain of events is constructed, which is represented as a set of directed graphs G=(V, E), where the weight of each edge is determined by the causal relationship strength Decide:

[0042] ;

[0043] ;

[0044] in, represents the edge between conflict event i and conflict event j. Exceeding the threshold , then there exists an edge, The threshold value indicating causality, represents the weight of the edge between conflict event i and conflict event j, represents the time attenuation coefficient, represents the time interval between conflict event i and conflict event j, It represents the sum of the causal relationship strengths between conflict event i and all other conflict events;

[0045] Optimize the generated causal logic chain, consider the time sequence and logical relationship of conflict and dispute events, and adjust the edge weights and structure in the causal logic chain:

[0046] ;

[0047] ;

[0048] in, represents the causal relationship strength between the optimized conflict and dispute events i and j, represents the balance factor, which determines the influence ratio of causal relationship strength and weight. represents the weight of the edge between conflict event i and conflict event j, represents the Euclidean distance between conflict event i and conflict event j, represents the location coordinates of conflict event i, Represents the location coordinates of conflict event j;

[0049] Generate the final causal logic chain L, describing the ins and outs of the conflict and dispute events, including the time of occurrence, key nodes and main participants of each conflict and dispute event:

[0050] ;

[0051] ;

[0052] in, Indicates that all causal relationships with strength exceeding the threshold are included The event pair, represents the causal relationship strength between the optimized conflict and dispute events i and j, represents the indicator function, when lead to 1 if yes, 0 otherwise. Represents the importance score of key node k, based on the strength of the causal relationship between the point and other events.

[0053] The beneficial effects of the present invention are:

[0054] Aiming at the characteristics of conflict and dispute events, the present invention designs a new event context analysis method that integrates a large language model and a thinking chain paradigm. By using the powerful semantic understanding and reasoning ability of the large language model, it can identify and analyze the relationship between events from unstructured text data. Through the thinking chain paradigm, it can build a causal logic chain between events, so as to fully and accurately understand and analyze the ins and outs, influencing factors and internal logic of conflict and dispute events. By integrating a large language model and a thinking chain paradigm, it can efficiently and accurately reveal the correlation and evolution process between events, providing strong technical support for the resolution of conflicts and disputes. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0056] Figure 1 A flow chart of a method for generating context of conflict and dispute events proposed by the present invention;

[0057] Figure 2 This is a functional schematic diagram of a method for generating the context of conflict and dispute events proposed by the present invention. DETAILED DESCRIPTION

[0058] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0059] refer to Figure 1-2 , a method for generating the context of conflict and dispute events. The core lies in using the thinking chain technology of large models to conduct in-depth logical causal analysis of conflict and dispute events, so as to accurately group the conflict and dispute events in which individuals participate according to the causal chain of their development. Each group maps a clear chain of personnel conflict and dispute events. By using this method to organize conflict and dispute events in a contextual manner, it can not only more accurately reveal the root causes and evolution mechanisms of the events, but also provide a more scientific and effective basis for the mediation of conflicts and disputes.

[0060] A method for generating a context of a conflict and dispute event comprises the following steps:

[0061] S1. Collect text data related to conflict and dispute events, including judicial documents, police records and case materials, and systematically integrate the collected text data to create a conflict and dispute event dataset;

[0062] S2. Clean the integrated conflict and dispute event data set, remove duplicate, erroneous and incomplete data, perform desensitization on sensitive information in the cleaned conflict and dispute event data set, and group and classify it to obtain a structured conflict and dispute event data set;

[0063] S3. Label the big model data based on the structured conflict event data set. The labeling is constructed in the form of (q, a) question-answer pairs. During the big model training process, the question (q) in the question-answer pair is used as the input of the big model, and the answer (a) in the question-answer pair is used as the output of the big model.

[0064] S4. Generate and sort out the context of structured conflict and dispute event data sets with the help of big models. By establishing a causal chain, we can build a causal logic chain from the perspective of the causes and consequences and evolution of conflict and dispute events, and understand and analyze conflict and dispute events;

[0065] S5. After fine-tuning the big model for reasoning about the context of conflict and dispute events, rewrite the input content of the newly input conflict and dispute event data set to match the format of the question (q) in the training data as the input of the big model. The reasoning results of the big model will be used as the context of the conflict and dispute events. The contexts of different conflict and dispute events will be post-processed and visualized, and understood and analyzed.

[0066] In this embodiment, in the cleaned conflict and dispute event data set, a collection strategy based on the persons involved is adopted to construct a structured conflict and dispute event data set with the persons involved as the center. The structured conflict and dispute event data set uses the persons involved as the grouping basis for the conflict and dispute event groups, and uses the identity card number or contact number of the persons as the unique identifier for grouping and collection. The use of such a unique identifier makes the data collection process more efficient and accurate, and avoids data confusion and errors. The structured conflict and dispute event data set after grouping and collection consists of multiple conflict and dispute event sets of the persons involved, and each conflict and dispute event set contains all conflict and dispute events related to the persons involved.

[0067] In this implementation, S3 adopts a large model input construction method based on conflict and dispute events. The input construction method is a combination of fixed prompt words and dynamic input event text. The dynamic input event text is a structured conflict and dispute event data set centered on the person involved.

[0068] In this embodiment, the answer (a) in the question-answer pair describes the relationship between conflict event i and conflict event j, explains why conflict event i is related to conflict event j, or how conflict event i leads to the occurrence of conflict event j.

[0069] The fixed prompt words are designed as: "You are an event context analyst. In the conflict and dispute scenario, please help me analyze the event context in all input events", and the dynamic input event text is based on a person-centered conflict and dispute event set, that is, it contains all conflict and dispute events related to a certain person. In the answer (a), in order to enhance the thinking chain ability of the large model when dealing with the conflict and dispute event context, the present invention adopts a detailed and specific description method. For example, the answer (a) describes the context relationship between event 1 and event 2, explaining why event 1 is related to event 2, or how event 1 leads to the occurrence of event 2. In this way, it is ensured that the answer contains rich thinking links, which helps the model to form a clearer and more coherent understanding when dealing with the conflict and dispute event context.

[0070] In this embodiment, S4 also includes using the LoRA method to fine-tune the large model, optimize the large model's thinking chain ability when sorting out the context of conflict and dispute events, keep the original pre-trained large model unchanged, and add a bypass structure next to the large model. The bypass structure simulates the update amount of parameters through low-rank decomposition and consists of two parts, A and B. In this way, the present invention can effectively enhance the ability of the large model in reasoning about the context of conflict and dispute events without changing the original model structure.

[0071] In this implementation, fine-tuning the large model specifically includes:

[0072] Encode the input text data and convert the character representation into word embedding representation:

[0073] ;

[0074] in, represents the word embedding matrix, represents the embedding representation of the text sequence, , n represents the length of the text segment, and x represents the text characters;

[0075] Adding positional encoding information to each word embedding allows the large model to understand the position of the word in the sentence:

[0076] ;

[0077] ;

[0078] Among them, pos represents the position of word embedding, i represents the dimension index, represents the word embeddings at even positions, Represent word embeddings at odd positions;

[0079] Embedding words to represent and position encoding Add together to get the comprehensive representation ;

[0080] Construct model input and fix prompt words and dynamic input event text Combine to form the final input text data :

[0081] I=\left [ {T,H} \right ] ;

[0082] The final input text data After being sent to the large model, each Transformer of the large model uses the attention mechanism to calculate the attention score of each word embedding representation and other word embedding representations in the sequence. At the same time, LoRA introduces low-rank matrix A and low-rank matrix B. Low-rank matrix A and low-rank matrix B are added to the attention calculation layer of the large model to adjust the parameters of the large model:

[0083] ;

[0084] Among them, Q, K, V are the query, key, and value matrices in the attention mechanism. is the dimension of the key vector;

[0085] In Transformer, the attention scores are integrated using a feed-forward network after the attention calculation layer:

[0086] ;

[0087] in, , and , Represents the weights and biases of the feedforward network;

[0088] In each Transformer of the large model, the LoRA adaptation layer is used to fine-tune the parameters, and the gradient descent algorithm is used on the LoRA adaptation layer to update the low-rank matrix A and low-rank matrix B:

[0089] ;

[0090] ;

[0091] in, represents the learning rate, represents the loss function.

[0092] In this implementation, during the fine-tuning training of the large model, the structure of the original large model remains unchanged, and only the low-rank matrix A and the low-rank matrix B are trained, while keeping the input and output dimensions of the large model consistent. In the initialization stage of the training, the low-rank matrix B is initialized using a random Gaussian distribution and is initialized to an all-zero matrix to ensure that the bypass matrix remains in a zero state at the beginning of training. In the inference stage, the trained low-rank matrix A and the low-rank matrix B are merged with the parameters of the original large model without adding additional inference time. This simplified inference method maintains efficient data processing capabilities.

[0093] In this implementation, the construction of the causal logic chain includes:

[0094] After the large model processes the text of conflict and dispute events through the attention mechanism and feedforward network, it generates the causal relationship matrix C between the conflict and dispute events. Each element in the causal relationship matrix C Indicates the causal relationship strength between conflict event i and conflict event j:

[0095] ;

[0096] in, represents the causal relationship strength between conflict event i and conflict event j, H represents the number of attention heads, T represents the time step, represents the query vector of the i-th event at the h-th attention head, represents the key vector of the j-th event at time step t, represents the value vector of the jth event at time step t, represents the element of the h-th row and t-th column of the low-rank matrix A, represents the element of the h-th row and t-th column of the low-rank matrix B;

[0097] Based on the causal relationship matrix C, the causal logic chain of events is constructed, which is represented as a set of directed graphs G=(V, E), where the weight of each edge is determined by the causal relationship strength Decide:

[0098] ;

[0099] ;

[0100] in, represents the edge between conflict event i and conflict event j. Exceeding the threshold , then there exists an edge, The threshold value indicating causality, represents the weight of the edge between conflict event i and conflict event j, represents the time attenuation coefficient, represents the time interval between conflict event i and conflict event j, It represents the sum of the causal relationship strengths between conflict event i and all other conflict events;

[0101] Optimize the generated causal logic chain, consider the time sequence and logical relationship of conflict and dispute events, and adjust the edge weights and structure in the causal logic chain:

[0102] ;

[0103] ;

[0104] in, represents the causal relationship strength between the optimized conflict and dispute events i and j, represents the balance factor, which determines the influence ratio of causal relationship strength and weight. represents the weight of the edge between conflict event i and conflict event j, represents the Euclidean distance between conflict event i and conflict event j, represents the location coordinates of conflict event i, Represents the location coordinates of conflict event j;

[0105] Generate the final causal logic chain L, describing the ins and outs of the conflict and dispute events, including the time of occurrence, key nodes and main participants of each conflict and dispute event:

[0106] ;

[0107] ;

[0108] in, Indicates that all causal relationships with strength exceeding the threshold are included The event pair, represents the causal relationship strength between the optimized conflict and dispute events i and j, represents the indicator function, when lead to 1 if yes, 0 otherwise. Represents the importance score of key node k, based on the strength of the causal relationship between the point and other events.

[0109] Aiming at the characteristics of conflict and dispute events, the present invention designs a new event context analysis method that integrates a large language model and a thought chain paradigm. The method utilizes the powerful semantic understanding and reasoning capabilities of a large language model to identify and analyze the relationship between events from unstructured text data. Through the thought chain paradigm, a causal logic chain between events can be constructed, thereby comprehensively and accurately understanding and analyzing the ins and outs, influencing factors and internal logic of conflict and dispute events. The new conflict and dispute event context generation method proposed by the present invention, by integrating a large language model and a thought chain paradigm, can efficiently and accurately reveal the correlation and evolution process between events, providing strong technical support for the resolution of conflicts and disputes.

[0110] Embodiment 1:

[0111] The judicial mediation center in City A often receives various conflicts and disputes between residents. These incidents involve neighborhood disputes, family disputes, debt disputes, etc. The previous solution mainly relies on the experience and manual analysis of the mediator, which is time-consuming and labor-intensive and prone to missing key details. In order to verify the feasibility and effectiveness, the present invention is applied in the judicial mediation center in City A.

[0112] The mediation center has collected a large amount of text data related to conflict and dispute incidents, including judicial documents, police records and case materials. These data cover detailed records of many neighborhood disputes, family disputes and debt disputes. By systematically integrating these data, a unified conflict and dispute incident data set is created. In Example 1, in a neighborhood dispute incident, Mr. A and Ms. B had a dispute over a leaking house, and had verbal and physical conflicts many times. The relevant police records and mediation records were included in the data set.

[0113] The integrated data set was strictly cleaned to remove duplicate, erroneous and incomplete data. At the same time, in order to protect personal privacy, sensitive information in the data was desensitized. In Example 1, the names of Mr. A and Ms. B were anonymized and converted to "Person 1" and "Person 2".

[0114] In the cleaned conflict and dispute event data set, a collection strategy based on the person involved is adopted to construct a structured conflict and dispute event data set centered on the person involved. Using the person's ID number or contact number as a unique identifier, all conflict and dispute events related to a specific person are grouped into the corresponding person event group. In Example 1, the event group of "personnel 1" contains all relevant dispute records of Mr. A, and the event group of "personnel 2" contains all relevant dispute records of Ms. B.

[0115] Based on the structured conflict event dataset, a training dataset was constructed and a large number of question-answer pairs (q, a) were annotated. The fixed prompt words were designed as: "You are an event context analyst. In the conflict scenario, please help me analyze the event context in all input events." The dynamic input event text is all conflict events related to a specific person. The answer part describes the context relationship between event 1 and event 2 in detail. For example, event 1 (house leaking problem) led to the occurrence of event 2 (dispute and conflict), and explained why event 1 is related to event 2.

[0116] The LoRA method is used to fine-tune the large model to optimize the model's ability to think in the context of conflict and dispute events. During the fine-tuning process, the input text data is encoded, position encoding information is added, and the attention mechanism is adjusted using low-rank matrices A and B. A large amount of conflict and dispute event data is used in the training process, including 100 neighborhood disputes, 50 family disputes, and 30 debt disputes, ensuring that the model can be generalized to different types of conflict and dispute events.

[0117] When the mediation center receives a new conflict and dispute event, the newly input event data is preprocessed and rewritten to match the format of the question (q) in the training data as the input of the large model. After the fixed prompt words and the dynamically input event text are combined, they are sent to the large model for reasoning to generate a context diagram of the conflict and dispute event. In Example 1, in a newly received neighborhood dispute event, the system generated a clear context diagram, showing that the house leakage problem (event 1) led to disputes and conflicts (event 2), and predicted possible subsequent developments (event 3, legal proceedings).

[0118] The conflict and dispute event context diagram output by the big model is post-processed and visualized. The context diagram not only shows the causal relationship between events, but also marks the key factors of each event, which is convenient for mediators to conduct in-depth analysis and understanding. For example, in the dispute case between Mr. A and Ms. B, the context diagram shows in detail the cause, process and result of each dispute, as well as the main demands and opinions raised by both parties.

[0119] In order to verify the beneficial effects of the method of the present invention, the mediation center conducted a comparative experiment and made a detailed comparison between the traditional manual analysis method and the method of the present invention. The experimental data are shown in Table 1 below:

[0120] Table 1 Comparison between the method of the present invention and the traditional method

[0121]

[0122] Take a family dispute as an example. Mr. A and Ms. B had a dispute over the division of family property. After several mediation attempts failed, the dispute eventually escalated into legal proceedings. Through the method of the present invention, the system conducted a detailed analysis and context generation of the incident:

[0123] Fixed prompt words: You are an event context analyst. In a conflict scenario, please help me analyze the event context in all input events.

[0124] Dynamic input event text: Contains all relevant conflict and dispute event records between Mr. A and Ms. B, including dispute records, mediation records and legal proceedings documents.

[0125] The generated veneer diagram:

[0126] Event 1: Dispute over division of family property (Mr. A and Ms. B had a dispute over division of property).

[0127] Event 2: Multiple mediations failed (multiple mediations failed to reach an agreement and the conflict escalated).

[0128] Event 3: Legal proceedings (Mr. A and Ms. B finally chose to resolve the issue through legal means).

[0129] Post-processing and visualization: The context diagram shows the causal relationships and key factors of each event in detail, and generates a detailed analysis report with mediation suggestions.

[0130] Through the method of the present invention, the mediator can quickly understand the ins and outs of the conflict and dispute incident, accurately grasp the key nodes and development trends of the incident, and significantly improve the efficiency and accuracy of the mediation work.

[0131] This embodiment demonstrates in detail the specific application of the method of the present invention in the process of generating the context of conflict and dispute events, which solves the problems of long time consumption, easy omissions and low analysis accuracy in traditional methods. By introducing advanced technical means, efficient and accurate analysis of conflict and dispute events is achieved, which has significant practical application value.

[0132] By combining the semantic understanding and generation capabilities of the big model with the thinking chain paradigm, the present invention can conduct a comprehensive and thorough analysis of complex conflict and dispute events, restore the causes and consequences, influencing factors, internal logic, etc. of the events, and generate high-quality event context reports.

[0133] The present invention is based on the way of thought chain, which decomposes the event analysis process into a series of explainable reasoning steps. The result of each step can be reviewed and corrected, and the entire reasoning chain has strong explainability and traceability.

[0134] The large model used in the present invention acquires rich general common sense knowledge during the pre-training process, which can be well transferred to specific event analysis, and combined with domain knowledge for generalized reasoning to improve the quality of analysis. By continuously introducing new event data and iterative learning based on manual feedback, this method can continuously enhance event analysis capabilities and adapt to the evolution of various complex situations.

[0135] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for generating the context of conflict and dispute events, characterized in that: The steps include: S1. Collect text data related to conflict and dispute events, including judicial documents, police records and case materials, and systematically integrate the collected text data to create a conflict and dispute event dataset; S2. Clean the integrated conflict and dispute event data set, remove duplicate, erroneous and incomplete data, perform desensitization on sensitive information in the cleaned conflict and dispute event data set, and group and classify it to obtain a structured conflict and dispute event data set; S3. Label the big model data based on the structured conflict event data set. The labeling is constructed in the form of (q, a) question-answer pairs. During the big model training process, the question (q) in the question-answer pair is used as the input of the big model, and the answer (a) in the question-answer pair is used as the output of the big model. The S3 adopts a large model input construction method based on conflict and dispute events. The input construction method is a combination of fixed prompt words and dynamic input event text. The dynamic input event text is a structured conflict and dispute event data set centered on the person involved. The answer (a) in the question-answer pair includes a description of the contextual relationship between conflict and dispute event i and conflict and dispute event j, an explanation of why conflict and dispute event i is related to conflict and dispute event j, or how conflict and dispute event i leads to the occurrence of conflict and dispute event j; S4. Generate and sort out the context of structured conflict and dispute event data sets with the help of big models. By establishing a causal chain, we can build a causal logic chain from the perspective of the causes and consequences and evolution of conflict and dispute events, and understand and analyze conflict and dispute events; The construction of the causal logic chain includes: After the large model processes the text of conflict and dispute events through the attention mechanism and feedforward network, it generates the causal relationship matrix C between the conflict and dispute events. Each element in the causal relationship matrix C Indicates the causal relationship strength between conflict event i and conflict event j: ; in, represents the causal relationship strength between conflict event i and conflict event j, H represents the number of attention heads, T represents the time step, represents the query vector of the i-th event at the h-th attention head, represents the key vector of the j-th event at time step t, represents the value vector of the jth event at time step t, represents the element of the h-th row and t-th column of the low-rank matrix A, represents the element of the h-th row and t-th column of the low-rank matrix B; Based on the causal relationship matrix C, the causal logic chain of events is constructed, which is represented as a set of directed graphs G=(V, E), where the weight of each edge is determined by the causal relationship strength Decide: ; ; in, represents the edge between conflict event i and conflict event j. Exceeding the threshold , then there exists an edge, The threshold for causality, represents the weight of the edge between conflict event i and conflict event j, represents the time attenuation coefficient, represents the time interval between conflict event i and conflict event j, It represents the sum of the causal relationship strengths between conflict event i and all other conflict events; Optimize the generated causal logic chain, consider the time sequence and logical relationship of conflict and dispute events, and adjust the edge weights and structure in the causal logic chain: ; ; in, represents the causal relationship strength between the optimized conflict and dispute events i and j, represents the balance factor, which determines the influence ratio of causal relationship strength and weight. represents the weight of the edge between conflict event i and conflict event j, represents the Euclidean distance between conflict event i and conflict event j, represents the location coordinates of conflict event i, Represents the location coordinates of conflict event j; Generate the final causal logic chain L, describing the ins and outs of the conflict and dispute events, including the time of occurrence, key nodes and main participants of each conflict and dispute event: ; ; in, Indicates that all causal relationships with strength exceeding the threshold are included The event pair, represents the causal relationship strength between the optimized conflict and dispute events i and j, represents the indicator function, when lead to 1 if yes, 0 otherwise. represents the importance score of the key node k, based on the strength of the causal relationship between the node and other events; S5. After fine-tuning the big model for reasoning about the context of conflict and dispute events, rewrite the input content of the newly input conflict and dispute event data set to match the format of the question (q) in the training data as the input of the big model. The reasoning results of the big model will be used as the context of the conflict and dispute events. The contexts of different conflict and dispute events will be post-processed and visualized, and understood and analyzed.

2. A method for generating the context of conflict and dispute events according to claim 1, characterized in that: In the cleaned conflict and dispute event data set, a collection strategy based on the persons involved is adopted to construct a structured conflict and dispute event data set with the persons involved as the center. The structured conflict and dispute event data set uses the persons involved as the grouping basis of the conflict and dispute event groups, and uses the identity card number or contact number of the persons as the unique identifier for grouping and collection. The structured conflict and dispute event data set after grouping and collection consists of multiple conflict and dispute event sets of the persons involved, and each conflict and dispute event set contains all conflict and dispute events related to the persons involved.

3. A method for generating the context of conflict and dispute events according to claim 2, characterized in that: The S4 also includes using the LoRA method to fine-tune the large model, optimizing the large model's thinking chain ability when sorting out the context of conflicts and disputes, keeping the original pre-trained large model unchanged, and adding a bypass structure next to the large model. The bypass structure simulates the parameter update amount through low-rank decomposition and consists of two parts, A and B.

4. A method for generating the context of conflict and dispute events according to claim 3, characterized in that: The fine-tuning of the large model specifically includes: Encode the input text data and convert the character representation into word embedding representation: ; in, represents the word embedding matrix, represents the embedding representation of the text sequence, , n represents the length of the text segment, and x represents the text characters; Adding positional encoding information to each word embedding allows the large model to understand the position of the word in the sentence: ; ; Among them, pos represents the position of word embedding, i represents the dimension index, represents the word embeddings at even positions, Represent word embeddings at odd positions; Embedding words to represent and position encoding Add together to get the comprehensive representation ; Construct model input and fix prompt words and dynamic input event text Combine to form the final input text data : ; The final input text data After being sent to the large model, each Transformer of the large model uses the attention mechanism to calculate the attention score of each word embedding representation and other word embedding representations in the sequence. At the same time, LoRA introduces low-rank matrix A and low-rank matrix B. Low-rank matrix A and low-rank matrix B are added to the attention calculation layer of the large model to adjust the parameters of the large model: ; Among them, Q, K, V are the query, key, and value matrices in the attention mechanism. is the dimension of the key vector; In Transformer, the attention scores are integrated using a feed-forward network after the attention calculation layer: ; in, , and , Represents the weights and biases of the feedforward network; In each Transformer of the large model, the LoRA adaptation layer is used to fine-tune the parameters, and the gradient descent algorithm is used on the LoRA adaptation layer to update the low-rank matrix A and low-rank matrix B: ; ; in, represents the learning rate, Represents the loss function.

5. A method for generating the context of conflict and dispute events according to claim 4, characterized in that: In the large model fine-tuning training, the structure of the original large model remains unchanged, and only the low-rank matrix A and the low-rank matrix B are trained, while keeping the input and output dimensions of the large model consistent. In the initialization stage of the training, the low-rank matrix B is initialized using a random Gaussian distribution and initialized to an all-zero matrix to ensure that the bypass matrix remains in a zero state at the beginning of training. In the inference stage, the trained low-rank matrix A and the low-rank matrix B are merged with the parameters of the original large model without adding additional inference time.

Citation Information

Patent Citations

  • Deep learning method for recognizing cause-effect relationship of contradictory dispute event

    CN111709244A

  • Event causeing method and device, computer equipment and storage medium

    CN113822430A

  • Recommendation and scoring system and method for contradictory mediation scheme

    CN116843162A

  • Acquiring device of causal relation knowledge

    JP1984167771A