Legal risk early warning method and system based on neural network

Through the staged training method based on neural network, the problems of inefficient efficiency and insufficient risk warning in the existing technology when dealing with legal and contract documents are solved, and efficient text extraction and legal risk prediction are achieved.

CN119990766AActive Publication Date: 2025-05-13WUHAN PKU HIGH-TECH SOFT CO LTD

Patent Information

Application Number
CN202510086579.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-13
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

The prior art is inefficient and prone to errors when processing legal and contract-related documents, making it difficult to efficiently and accurately extract text information from images or voice, and conduct effective risk warnings and predictions.

Method used

Using a neural network-based legal risk warning method, text extraction models and risk prediction models are trained in stages, text information is automatically extracted from images or voice, and potential legal risks are predicted based on this information.

Benefits of technology

It realizes automatic and efficient extraction of text information and predicts legal risks, reduces manual intervention, and improves the efficiency and accuracy of legal risk management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990766A_ABST
    Figure CN119990766A_ABST
Patent Text Reader

Abstract

The invention provides a legal risk early warning method and system based on a neural network, and relates to the technical field of data processing, and the method comprises the steps: obtaining a plurality of pieces of first information, and second information and third information corresponding to each piece of first information; inputting a preset neural network model for training based on the first information and the corresponding second information to obtain a character extraction model; training a neural network model based on the second information and the corresponding third information to obtain a risk prediction model; and target information is acquired, the target information is input into a prediction model, target risk early warning information is obtained, and the prediction model is composed of a character extraction model and a risk prediction model. According to the method, the character extraction model and the risk prediction model are trained in stages, the character information can be automatically and efficiently extracted from the image or the voice, and the potential legal risk is predicted based on the character information, so that manual intervention is reduced, and the efficiency and the accuracy of legal risk management can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a legal risk early warning method and system based on neural network. Background Art

[0002] With the development of information technology, enterprises and organizations are faced with a large number of data and information extraction problems when dealing with legal and contract-related documents. Traditional manual extraction and proofreading methods are inefficient and prone to errors. Therefore, how to efficiently and accurately extract text information from images or voices and further predict potential risks has become a technical challenge that needs to be solved. Existing technologies mostly rely on rules or keyword matching methods, which are difficult to cope with the changeable and complex legal texts, and cannot effectively carry out risk warning and prediction. Summary of the invention

[0003] The purpose of the present invention is to provide a legal risk early warning method and system based on neural network to improve the above problems. In order to achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0004] In a first aspect, the present application provides a legal risk early warning method based on a neural network, comprising:

[0005] Acquire multiple first information, and second information and third information corresponding to each first information, wherein the first information is image information or voice information carrying legal and contract related information, the second information is text information obtained by extracting text from the first information and manually correcting it, and the third information is risk warning information corresponding to the first information;

[0006] Based on the first information and the corresponding second information, a preset neural network model is input for training, and when a preset first loss function satisfies a first set condition, the training is stopped to obtain a text extraction model;

[0007] Training the neural network model based on the second information and the corresponding third information, and stopping the training when the preset second loss function meets the second set condition to obtain a risk prediction model;

[0008] Target information is acquired and input into a prediction model to obtain target risk warning information, wherein the prediction model is composed of the text extraction model and the risk prediction model.

[0009] In the second aspect, the present application also provides a legal risk early warning system based on a neural network, including:

[0010] A first acquisition unit is used to acquire multiple first information, and second information and third information corresponding to each first information, wherein the first information is image information or voice information carrying legal and contract related information, the second information is text information obtained by extracting text from the first information and manually correcting it, and the third information is risk warning information corresponding to the first information;

[0011] A first input unit, used to input a preset neural network model for training based on the first information and the corresponding second information, and when a preset first loss function satisfies a first set condition, stop the training to obtain a text extraction model;

[0012] A training unit, configured to train the neural network model based on the second information and the corresponding third information, and to stop the training when the preset second loss function satisfies a second set condition, so as to obtain a risk prediction model;

[0013] The second acquisition unit is used to acquire target information and input the target information into a prediction model to obtain target risk warning information. The prediction model is composed of the text extraction model and the risk prediction model.

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

[0015] The present invention can automatically and efficiently extract text information from images or voices by training text extraction models and risk prediction models in stages, and predict potential legal risks based on the text information, thereby reducing manual intervention and improving the efficiency and accuracy of legal risk management.

[0016] Other features and advantages of the present invention will be set forth in the following description, and in part will become apparent from the description, or may be understood by practicing embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 It is a flowchart of the legal risk early warning method based on neural network in the present invention;

[0019] Figure 2 It is a schematic diagram of the structure of the legal risk early warning system based on neural network in the present invention;

[0020] Markings in the figure: 10, first acquisition unit; 20, first input unit; 30, training unit; 40, second acquisition unit. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0022] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0023] Embodiment 1:

[0024] This embodiment provides a legal risk early warning method based on neural network. Figure 1 , including step S10, step S20, step S30 and step S40.

[0025] Step S10. Acquire multiple first information, and second information and third information corresponding to each first information, wherein the first information is image information or voice information carrying legal and contract related information, the second information is text information obtained by extracting text from the first information and manually correcting it, and the third information is risk warning information corresponding to the first information;

[0026] Step S20. Based on the first information and the corresponding second information, a preset neural network model is input for training. When the preset first loss function satisfies the first set condition, the training is stopped to obtain a text extraction model.

[0027] The transmission methods of contract and legal related information are becoming increasingly diverse, especially the application of images and audio is becoming more and more common. Since the information contained in images and audio often needs to be converted into text for further analysis and processing, this process is not only time-consuming and labor-intensive, but also easily affected by noise, fuzziness or non-standardized formats, resulting in inaccurate extracted text information. Therefore, in this embodiment, it is necessary to first clarify the acquired image or voice information before performing text extraction, so as to ensure the accuracy of text extraction.

[0028] Specifically, the step S20 specifically includes steps S21 to S26:

[0029] Step S21. Obtain interference information, where the interference information is interference image information or interference voice information;

[0030] The interfering image information is an image with blurred text due to shooting conditions, changes in ambient light or other factors; the interfering voice information is a voice with background noise, echo or unclear sound quality.

[0031] Step S22. Preprocess the first information and the interference information to obtain preprocessed first processed information and second processed information respectively;

[0032] Step S23. Input the first processed information and the second processed information into the trained clear enhancement model to obtain enhanced processed information;

[0033] Taking into account that both image information and voice information may involve the existence of some interference information, it is necessary to clean and enhance the image information and voice information so that the corresponding text images and text voices are clearer and easier to extract and recognize the subsequent text.

[0034] Step S24. Input the enhanced voice information into the neural network model to obtain predicted text information, which helps to accurately convert key information in the voice signal into text information and reduce the impact of interference on voice recognition.

[0035] Step S25. Calculate a first loss function based on the predicted text information and the corresponding text information. When the first loss function does not meet the first set condition, adjust the weight threshold vector combination to obtain an adjusted neural network model. The weight threshold vector combination includes an initial weight vector between neurons in each layer of the neural network model and an initial threshold matrix vector of each neuron.

[0036] Step S26. When the first loss function satisfies the first set condition, the corresponding neural network model is used as a text extraction model;

[0037] Therefore, the prediction ability of the neural network model can be continuously optimized by calculating the first loss function and adjusting the weights and thresholds according to the results. The specific first setting condition can be set accordingly according to the model accuracy, and no special restrictions are made here.

[0038] Step S30. Training the neural network model based on the second information and the corresponding third information, and when the preset second loss function meets the second set condition, stopping the training to obtain a risk prediction model;

[0039] The constructed neural network model includes a processing layer, a hidden layer and an output layer. The processing layer consists of an input layer and an optimization layer. The main function of the processing layer is to convert the input text information into a data type that can be processed by the neural network and generate the input data required by the hidden layer. At the same time, the optimization layer in the processing layer will optimize the initial weights and thresholds generated by the neural network model to obtain the preliminary optimal weights and thresholds. The hidden layer is responsible for processing the output data of the processing layer, linearly dividing the input nonlinear data in a multi-level abstract manner, and adjusting the characteristics of the input data through weighted correction calculations, and finally generating the input data required by the output layer. The output layer performs weighted correction calculations on the output data of the hidden layer to obtain the initial risk prediction results of the neural network model, and then uses the loss function to evaluate the loss of the initial risk prediction results, calculate the gradient of the loss value of each level, and perform reverse transmission to optimize the neural network prediction model, and finally achieve accurate prediction of risks.

[0040] Step S40. Obtain target information and input the target information into the prediction model to obtain target risk warning information. The prediction model is composed of a text extraction model and a risk prediction model. Ultimately, the text extraction model and the risk prediction model are used to effectively identify and predict target risks.

[0041] Embodiment 2:

[0042] The difference between this embodiment and embodiment 1 is that step S23. The first processing information and the second processing information are input into the trained clear enhancement model to obtain enhanced processing information, which specifically includes the following steps:

[0043] Step S231. Map the first processed information into the frequency domain and extract the frequency domain features to obtain the first feature information;

[0044] Step S232: Map the second processed information to the frequency domain and extract the frequency domain features to obtain the second feature information;

[0045] Step S233. Process the first feature information and the second feature information based on a non-negative matrix decomposition algorithm to obtain processed third feature information and fourth feature information respectively;

[0046] Step S234: Perform cleaning and strengthening processing on the first information based on the third characteristic information and the fourth characteristic information.

[0047] Therefore, this embodiment can effectively capture the key characteristics hidden in the data by mapping the first processed information and the second processed information to the frequency domain and extracting frequency domain features, and then use the non-negative matrix decomposition algorithm to process the extracted features, further separate and optimize the first feature information and the second feature information, and generate purer third feature information and fourth feature information, thereby greatly reducing the impact of interference on the data.

[0048] The clarity and quality of the first information are further significantly improved through cleaning and enhancement processing, which facilitates the subsequent model to accurately extract the target text information in a high-ambiguity and high-noise environment, thereby improving the accuracy and robustness of the subsequent prediction model.

[0049] In addition, step S25. calculating a first loss function based on the predicted text information and the corresponding text information, and when the first loss function does not meet the first set condition, adjusting the weight threshold vector combination to obtain an adjusted neural network model, includes the following steps:

[0050] Step S251. Extracting a plurality of target words from the predicted text information and the corresponding text information, the target words being words whose frequencies of occurrence in both the predicted text information and the text information are greater than a set threshold;

[0051] Step S252. Randomly select a number of target words from the plurality of target words as reference words, calculate the difference between the appearance frequency of the remaining target words in the predicted text information and the appearance frequency of the reference words, and the difference between the appearance frequency of the remaining target words in the text information and the appearance frequency of the reference words, and obtain a plurality of first differences and a plurality of second differences;

[0052] Step S253. Construct a first difference vector and a second difference vector based on the plurality of first differences and the plurality of second differences respectively;

[0053] In this embodiment, the words with the top 15 occurrence frequencies are used as the benchmark words, and the difference between the occurrence frequencies of the remaining target words in the predicted text information and the occurrence frequency of the first benchmark word is used as the first difference vector:

[0054]

[0055] in, is the first difference vector corresponding to the first benchmark vocabulary; is the difference between the frequency of occurrence of the zth target word and the first benchmark word in the predicted text information; z is the number of target words in the predicted text information.

[0056] The difference between the frequency of occurrence of the remaining target words in the text information and the frequency of occurrence of the first benchmark word is used as the second difference vector:

[0057]

[0058] in, is the second difference vector corresponding to the first benchmark vocabulary; is the difference between the occurrence frequencies of the zth target word and the first benchmark word in the text information; z is the number of target words in the text information; thus, a total of fifteen first difference vectors and fifteen second difference vectors can be obtained.

[0059] Step S254. Constructing the first loss function based on the cosine distance of the angle between the first difference vector and the second difference vector;

[0060] Specifically, the first loss function calculation formula includes:

[0061]

[0062] in, is the first difference vector corresponding to the j-th benchmark vocabulary; is the second difference vector corresponding to the jth benchmark word; m is the number of benchmark words, j∈m, and the value of m in this application is 15.

[0063] Embodiment 3:

[0064] The difference between this embodiment and embodiment 1 or 2 is that step S30. The neural network model is trained based on the second information and the corresponding third information. When the preset second loss function meets the second set condition, the training is stopped to obtain the risk prediction model, including the following steps:

[0065] Step S31. Input multiple second information into the processing layer for classification and fusion to obtain multiple overall feature data;

[0066] Considering the large amount of text in legal and contract-related information, and the fact that this information may contain a lot of noise and redundant content, the above problems may affect the validity of the data. If it is used directly for model training without being processed, it may cause the model to overfit, that is, over-reliance on the details of the training data, reducing the ability to generalize to new information. Therefore, it is necessary to effectively extract features from this information to reduce the adverse effects of noise and redundancy on model training, thereby improving the stability and performance of the model.

[0067] Step S32: Input multiple overall feature data into the hidden layer, and obtain multiple feature vector data through multi-layer nonlinear transformation and other methods.

[0068] Step S33. Input multiple feature vector data into the output layer to obtain multiple prediction risk warning information;

[0069] The feature vector extracted by the hidden layer usually has a strong recognition. After inputting it into the output layer, it can more accurately predict the risk warning information and improve the accuracy and robustness of the prediction model.

[0070] And, step S34. Calculate a second loss function based on the predicted risk warning information and the corresponding risk warning information, and when the second loss function does not meet the second set condition, adjust the neural network model parameters until the first loss function meets the first set condition, thereby obtaining a risk prediction model;

[0071] Among them, risk warning information includes risk level, risk probability and risk category. Among them, risk level indicates the severity of risk, which is divided into low risk, medium risk and high risk; risk probability indicates the possibility of predicting the occurrence of risk events, and the probability value is usually between 0-1; risk category classifies risks according to different standards, such as legal risk, financial risk, operational risk, etc.

[0072] Embodiment 4:

[0073] The difference between this embodiment and embodiment 3 is that step S31. multiple second information input processing layers are classified and merged to obtain multiple overall feature data, which specifically includes the following steps:

[0074] Step S311. Classify and process the content contained in the second information to obtain multiple target classification clusters and corresponding warning risk probabilities;

[0075] In this embodiment, the content can be divided into multiple categories based on the text in the second information. For example, for a general contract, it can be divided into multiple classification clusters such as main information, main terms, additional terms, and default risk. There are also differences in the categories divided for different contract contents, and no special restrictions are made here.

[0076] Step S312: Encode the content in each target classification cluster to obtain target feature data and multiple feature data, where the target feature data represents the content in the target classification cluster that is most likely to have a warning risk;

[0077] Step S313. Calculate the association degree value between the target feature data and multiple feature data in each target classification cluster based on the grey correlation analysis algorithm, and use the target feature data and multiple feature data as a node, and use the association degree values ​​between the target feature data and the multiple feature data as edges between the nodes, and the length of the edge is related to the association degree value;

[0078] Step S314. Based on the correlation degree value, the warning risk probability and the target characteristic data, the multiple characteristic data are updated to obtain the updated multiple characteristic data;

[0079] Step S315. Fusing the target feature data in each target classification cluster with the updated plurality of feature data to obtain a plurality of overall feature data;

[0080] Considering that the probability of early warning risks in different classification clusters is not the same, taking the above classification cluster as an example: the contract subject information usually includes the basic information of the parties to the contract, such as company name, legal representative, contact information, etc. The above information usually does not contain significant risk factors, so the probability of early warning risks is relatively small; while the main terms in the contract (such as contract subject, price, delivery time, etc.) and breach of contract risks (such as payment delays, breach of contract liability, etc.) often hide potential early warning risks. Changes or execution issues of these terms may directly affect the performance of the contract or cause legal disputes, so the probability of early warning risks is relatively high.

[0081] For the content in the classification cluster, the correlation degree values ​​between the target feature data and multiple feature data in each classification cluster are not the same. In this application, the target feature data represents the content in the target classification cluster that is most likely to have warning risks. Feature data with a low correlation degree value with the target feature data usually indicates that these data are less important in risk warning or contribute less to the model's prediction. Therefore, only feature data with a correlation degree value greater than a certain value is updated and acts on subsequent model training, thereby reducing unnecessary data processing during model training and improving training efficiency.

[0082] Therefore, for different classification clusters and the feature data in each classification cluster, the updates include:

[0083] t' iq =σ(P q *t iq *S niq *t nq )

[0084] Among them, t′ iq is the updated data of the i-th feature data in the q-th classification cluster; t iq is the i-th feature data in the q-th classification cluster; S niq is the correlation value between the i-th feature data and the target feature data in the q-th classification cluster; t nq is the target feature data in the qth classification cluster; P q is the warning risk probability corresponding to q classification clusters; σ is the activation function.

[0085] The feature data in different classification clusters and each classification cluster are updated. The updated feature data can better emphasize similar features and highlight key information related to risk warning, thereby improving the model's ability to identify potential risks.

[0086] Embodiment 5:

[0087] The difference between this embodiment and embodiment 3 is that step S34. Calculating a second loss function based on the predicted risk warning information and the corresponding risk warning information, when the second loss function does not meet the second set condition, adjusting the neural network model parameters until the first loss function meets the first set condition, and obtaining a risk prediction model, comprises the following steps:

[0088] Step S341. When the risk categories in the predicted risk warning information and the corresponding risk warning information are consistent, a second loss function is constructed based on the cross entropy loss function of the risk level and the risk occurrence probability in the predicted risk warning information and the risk warning information;

[0089] When the risk categories of the predicted risk warning information and the corresponding actual risk warning information are consistent, an indicator for measuring the accuracy of the prediction can be constructed simply by quantifying the differences in risk levels and risk occurrence probabilities.

[0090] Step S342. When the risk categories in the predicted risk warning information and the corresponding risk warning information are inconsistent, the ratio of the preset risk category joint occurrence probability and the risk occurrence probability in the predicted risk warning information and the risk warning information is calculated to obtain a first ratio and a second ratio respectively;

[0091] In this embodiment, when the risk categories are inconsistent, the joint occurrence probability of the preset risk categories is calculated, which is the ratio of the risk occurrence probability in the predicted value to the actual value. The two ratios respectively reflect the relative deviations between the two, providing a quantitative basis for subsequent loss calculations.

[0092] Step S343: Calculate the first loss based on the mean square error of the first ratio and the second ratio; for example, in this embodiment, the first loss can be calculated using the mean square error (MSE).

[0093] Step S344. Calculate a second loss based on the cross entropy loss function of the predicted risk warning information and the risk level in the risk warning information;

[0094] Therefore, considering the predicted and actual values ​​of the risk level, this embodiment calculates the second loss through the cross entropy loss function to help the model optimize in the risk level dimension.

[0095] Step S345. Calculate a third loss based on the cross entropy loss function of the predicted risk warning information and the risk occurrence probability in the risk warning information;

[0096] Specifically, for the probability of risk occurrence, the third loss is calculated through the cross entropy loss function to optimize the model's ability to predict the possibility of event occurrence.

[0097] Step S346. Construct a second loss function based on the first loss, the second loss and the third loss to achieve all-round optimization of the model, weigh the deviations in different dimensions, and ensure that the model achieves high-precision prediction effects in key aspects such as risk category, risk level and probability of occurrence.

[0098] Embodiment 6:

[0099] like Figure 2 As shown, this embodiment provides a legal risk early warning system based on a neural network, which can implement the legal risk early warning method described in any one of Embodiments 1-5. The legal risk early warning system includes:

[0100] A first acquisition unit 10 is used to acquire a plurality of first information, and second information and third information corresponding to each first information, wherein the first information is image information or voice information carrying legal and contract related information, the second information is text information obtained by extracting text from the first information and manually correcting it, and the third information is risk warning information corresponding to the first information;

[0101] A first input unit 20, used to input a preset neural network model for training based on the first information and the corresponding second information, and when the preset first loss function satisfies a first set condition, stop the training to obtain a text extraction model;

[0102] A training unit 30, used to train the neural network model based on the second information and the corresponding third information, and when the preset second loss function meets the second set condition, stop the training to obtain the risk prediction model;

[0103] The second acquisition unit 40 is used to acquire target information and input the target information into a prediction model to obtain target risk warning information. The prediction model is composed of a text extraction model and a risk prediction model.

[0104] It should be noted that, regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0105] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0106] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A legal risk early warning method based on neural network, characterized in that: include: Acquire multiple first information, and second information and third information corresponding to each first information, wherein the first information is image information or voice information carrying legal and contract related information, the second information is text information obtained by extracting text from the first information and manually correcting it, and the third information is risk warning information corresponding to the first information; Based on the first information and the corresponding second information, a preset neural network model is input for training, and when a preset first loss function satisfies a first set condition, the training is stopped to obtain a text extraction model; Training the neural network model based on the second information and the corresponding third information, and stopping the training when the preset second loss function meets the second set condition to obtain a risk prediction model; Target information is acquired and input into a prediction model to obtain target risk warning information, wherein the prediction model is composed of the text extraction model and the risk prediction model.

2. The legal risk early warning method according to claim 1 is characterized in that Based on the first information and the corresponding second information, a preset neural network model is input for training. When the preset first loss function meets the first set condition, the training is stopped to obtain a text extraction model, including: Obtaining interference information, where the interference information is interference image information or interference voice information; Preprocessing the first information and the interference information to obtain first processed information and second processed information after preprocessing, respectively; Inputting the first processed information and the second processed information into the trained clear enhancement model to obtain enhanced processed information; Inputting the enhanced speech information into the neural network model to obtain predicted text information; Calculating a first loss function based on the predicted text information and the corresponding text information, and when the first loss function does not meet the first set condition, adjusting the weight threshold vector combination to obtain the adjusted neural network model, wherein the weight threshold vector combination includes an initial weight vector between neurons in each layer of the neural network model and an initial threshold matrix vector of each neuron; When the first loss function satisfies a first set condition, the corresponding neural network model is used as the text extraction model.

3. The legal risk early warning method according to claim 1 is characterized in that , based on the second information and the corresponding third information, the neural network model is trained, and when the preset second loss function meets the second set condition, the training is stopped to obtain a risk prediction model, the neural network model includes a processing layer, a hidden layer and an output layer, including: Inputting a plurality of the second information into the processing layer for classification and fusion to obtain a plurality of overall feature data; Inputting a plurality of overall feature data into the hidden layer to obtain a plurality of feature vector data; Inputting a plurality of feature vector data into the output layer to obtain a plurality of prediction risk warning information; A second loss function is calculated based on the predicted risk warning information and the corresponding risk warning information. When the second loss function does not meet the second set condition, the neural network model parameters are adjusted until the first loss function meets the first set condition, thereby obtaining the risk prediction model.

4. The legal risk early warning method according to claim 2 is characterized in that , calculating a first loss function based on the predicted text information and the corresponding text information, including: Extracting a plurality of target words from the predicted text information and the corresponding text information, wherein the target words are words whose frequencies of appearance in both the predicted text information and the text information are greater than a set threshold; Randomly selecting a number of target words from a plurality of target words as reference words, and calculating the difference between the appearance frequency of the remaining target words in the predicted text information and the appearance frequency of the reference words, and the difference between the appearance frequency of the remaining target words in the text information and the appearance frequency of the reference words, respectively, to obtain a plurality of first differences and a plurality of second differences; Based on the plurality of first differences and the plurality of second differences, respectively, a first difference vector and a second difference vector are formed; The first loss function is constructed based on the cosine distance of the angle between the first difference vector and the second difference vector.

5. The legal risk early warning method according to claim 3 is characterized in that , input multiple pieces of the second information into the processing layer for classification and fusion, and obtain multiple overall feature data, including: Perform classification processing based on the content contained in the second information to obtain multiple target classification clusters and corresponding warning risk probabilities; Encoding the content in each target classification cluster to obtain target feature data and multiple feature data, wherein the target feature data represents the content in the target classification cluster that is most likely to have a warning risk; Calculate the association degree value between the target feature data and multiple feature data in each target classification cluster based on the grey correlation analysis algorithm, and take the target feature data and multiple feature data as a node, and take the association degree values ​​between the target feature data and multiple feature data as edges between the nodes, and the length of the edge is related to the association degree value; Based on the correlation degree value, the warning risk probability and the target characteristic data, a plurality of characteristic data are updated to obtain a plurality of updated characteristic data; The target feature data in each target classification cluster and the updated multiple feature data are fused to obtain multiple overall feature data.

6. The legal risk early warning method according to claim 3 is characterized in that , calculating a second loss function based on the predicted risk warning information and the corresponding risk warning information, wherein the risk warning information includes the risk level, the risk occurrence probability and the risk category, including: When the risk categories in the predicted risk warning information and the corresponding risk warning information are consistent, constructing the second loss function based on the cross entropy loss function of the risk level and the risk occurrence probability in the predicted risk warning information and the risk warning information; When the risk categories in the predicted risk warning information and the corresponding risk warning information are inconsistent, calculating the ratio of the preset risk category joint occurrence probability and the predicted risk warning information and the risk occurrence probability in the risk warning information to obtain a first ratio and a second ratio respectively; Calculating a first loss based on a mean square error of the first ratio and the second ratio; Calculating a second loss based on a cross entropy loss function of the predicted risk warning information and the risk level in the risk warning information; Calculating a third loss based on a cross entropy loss function of the predicted risk warning information and the risk occurrence probability in the risk warning information; The second loss function is constructed based on the first loss, the second loss and the third loss.

7. The legal risk early warning method according to claim 2 is characterized in that , inputting the first processed information and the second processed information into the trained clear enhancement model to obtain enhanced processed information, including: Mapping the first processed information to the frequency domain and extracting frequency domain features to obtain first feature information; Mapping the second processed information to the frequency domain and extracting frequency domain features to obtain second feature information; Processing the first feature information and the second feature information based on a non-negative matrix decomposition algorithm to obtain processed third feature information and fourth feature information respectively; The first information is subjected to cleaning enhancement processing based on the third characteristic information and the fourth characteristic information.

8. The neural network-based legal risk early warning method according to claim 5 is characterized in that , based on the correlation degree value, the warning risk probability and the target characteristic data, multiple characteristic data are updated to obtain multiple updated characteristic data, including: t’ i =σ(t i *S ni *t n ) Among them, t' i is the updated feature data of the ith item; t i is the i-th feature data; S ni is the correlation degree between the ith feature data and the target feature data; t n is the target feature data; σ is the activation function.

9. The legal risk early warning method according to claim 4 is characterized in that ,The first loss function calculation formula includes: in, is the first difference vector corresponding to the first benchmark vocabulary; is the second difference vector corresponding to the first benchmark vocabulary; m is the number of benchmark vocabulary.

10. A legal risk early warning system based on neural network, characterized in that: include: A first acquisition unit is used to acquire multiple first information, and second information and third information corresponding to each first information, wherein the first information is image information or voice information carrying legal and contract related information, the second information is text information obtained by extracting text from the first information and manually correcting it, and the third information is risk warning information corresponding to the first information; A first input unit, used to input a preset neural network model for training based on the first information and the corresponding second information, and when a preset first loss function satisfies a first set condition, stop the training to obtain a text extraction model; A training unit, configured to train the neural network model based on the second information and the corresponding third information, and to stop the training when the preset second loss function satisfies a second set condition, so as to obtain a risk prediction model; The second acquisition unit is used to acquire target information and input the target information into a prediction model to obtain target risk warning information. The prediction model is composed of the text extraction model and the risk prediction model.

Citation Information

Patent Citations

  • Contract term risk identification method and device

    CN110705265A

  • Prompting method, device and equipment for risk information in contract text

    CN112632989A

  • Differential privacy aggregation-based graph neural network construction method and construction system

    CN113095490A

Cited By

  • Complex stratum high-water-pressure large-diameter shield tunnel construction management method and system

    CN121094525A