Sentence prediction method, device, storage medium and equipment
By obtaining and analyzing case information and determining the degree of compatibility between legal provisions and prison terms, the problem of lack of interpretability in neural network predictions is solved, judicial interpretability and accuracy of prison term predictions are achieved, and the practicality of prison term predictions is improved.
Patent Information
- Application Number
- CN201911053891.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-31
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2039-10-31
AI Technical Summary
Existing sentencing prediction methods are based on neural networks, which lack interpretability and cannot show the trial logic from crime facts to sentencing, resulting in their failure to be widely used.
By obtaining the target case information, determine whether judicial elements related to the sentence exist, and determine the target amount and sentence based on the fit between the legal terms and the case information, simulate the logic of judicial trials, and improve the interpretability and accuracy of predictions.
On the basis of ensuring the accuracy of prediction, the process of sentence prediction is judicially interpretable, which improves the practicality of sentence prediction and ensures the interpretability of prediction results.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and more specifically, to a sentence prediction method, device, storage medium and equipment. Background Art
[0002] The certainty of the law and the predictability of the consequences of behavior are the basic characteristics of a legal society. Therefore, the problem of sentence prediction has gradually become an important part of the information mining and analysis of judgment documents. The purpose of sentence prediction is to predict the sentence to be imposed based on the information describing the crime facts, which has great development space in assisting judicial trials and legal consultation.
[0003] The current sentence prediction methods are all based on natural language processing technology of neural networks, but the neural network model lacks certain interpretability due to its inherent black box modeling form. It only takes the description of the crime facts as input and the sentence as output, and cannot show the trial logic from the crime facts to the sentence, so it has not been widely used. Summary of the invention
[0004] In view of the above problems, the present invention provides a sentence prediction method, apparatus, storage medium and device that overcome the above problems or at least partially solve the above problems.
[0005] The embodiment of the present invention provides the following solution:
[0006] A sentence prediction method, comprising:
[0007] Obtaining target case information, wherein the target case information indicates whether various judicial elements related to the sentence exist in the case of the sentence to be predicted;
[0008] For each legal provision related to the sentence, the target amount in the legal provision is determined according to the degree of compatibility between each amount in the legal provision and the target case information;
[0009] The target sentence is determined based on the compatibility of each sentence within the range of sentence values with all the determined target amounts.
[0010] In the above method, preferably, determining the target clause in the legal provision according to the degree of compatibility between each clause in the legal provision and the target case information comprises:
[0011] According to the distribution of the adaptability of the pre-learned legal clauses and case information, determine the adaptability of each clause in the legal clause to the target case information;
[0012] The clause in the law that has the greatest degree of compatibility with the target case information is determined as the target clause in the law.
[0013] In the above method, preferably, the distribution of the adaptability between the pre-learned legal clauses and the case information is as follows:
[0014] The probability distribution of the legal clauses learned from historical judicial cases under the condition of case information is multiplied by the multiplication result of the probability of each judicial element related to the sentence existing in the case, and the distribution of the fitness of the legal clauses and the case information is obtained;
[0015] Among them, the probability of each judicial element existing in the case is: the ratio of the number of historical judicial cases containing this judicial element to the total number of historical judicial cases.
[0016] In the above method, preferably, the step of determining the target sentence based on the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts comprises:
[0017] According to the distribution of the fitness of the sentences and legal clauses learned in advance, determine the fitness of each sentence within the range of the sentence value and all the determined target clauses;
[0018] The target sentence is determined to be the sentence that best matches all the target payments identified.
[0019] In the above method, preferably, the distribution of the adaptability between the pre-learned prison terms and legal provisions is:
[0020] The probability distribution of the sentence under the conditions of the legal clauses learned from historical judicial cases is multiplied by the probability of each clause in the legal clause related to the sentence existing in historical judicial cases to obtain the distribution of the fitness of the sentence and the legal clause;
[0021] Among them, the probability of each amount existing in a historical judicial case is: the frequency of the amount appearing in historical judicial cases.
[0022] The above method preferably further comprises:
[0023] At least output the degree of compatibility between each target item and the target case information;
[0024] and / or,
[0025] Output the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts.
[0026] In the above method, preferably, the output of at least the degree of compatibility between each item in each legal provision related to the sentence and the target case information; and / or the output of the degree of compatibility between each sentence within the range of the sentence value and all the determined target items, includes:
[0027] Output the degree of compatibility between each clause in each legal provision related to the sentence and the target case information in the form of a node graph;
[0028] and / or,
[0029] The degree of compatibility between each sentence within the sentence value range and all the determined target amounts is output in the form of a node graph.
[0030] A prison sentence prediction device, comprising:
[0031] An acquisition module, used to acquire target case information, wherein the target case information represents whether various judicial elements related to the sentence exist in the case of the sentence to be predicted;
[0032] The first prediction module is used to determine the target amount in each legal provision related to the sentence according to the degree of compatibility between each amount in the legal provision and the target case information;
[0033] The second prediction module is used to determine the target sentence according to the compatibility of each sentence within the sentence value range with all the determined target amounts.
[0034] A storage medium comprising a stored program, wherein the program executes the sentence prediction method as claimed in any one of the above claims.
[0035] A device comprising at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute a sentence prediction method as described in any one of the above items.
[0036] By means of the above technical scheme, the sentence prediction method, device, storage medium and equipment provided by the present invention obtain the target case information, first determine the target amount according to the adaptability of the legal clauses and the target case information, and then determine the target sentence according to the adaptability of the sentence and the determined target amount. Since the adaptability of the legal clauses and the target case information reflects the degree to which the legal clauses are applicable to the target case information, and the adaptability of the sentence and the determined target amount reflects the degree to which the sentence is applicable to the target amount, it is equivalent to the simulation of the judicial trial logic, and thus has judicial interpretation. Moreover, the accuracy of the sentence prediction method of the present application is comparable to the accuracy of the sentence prediction method based on the neural network. In other words, the basic application scheme realizes that the sentence prediction process has judicial interpretation on the basis of ensuring the accuracy of the prediction, thereby improving the practicality of the sentence prediction.
[0037] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0039] Figure 1 A flowchart of an implementation of the sentence prediction method provided by an embodiment of the present invention is shown.
[0040] Figure 2 A network structure of a Bayesian network provided by an embodiment of the present invention is shown;
[0041] Figure 3 Another network structure of the Bayesian network provided by an embodiment of the present invention is shown;
[0042] Figure 4 Another network structure of the Bayesian network provided by the embodiment of the present invention is shown;
[0043] Figure 5 An example diagram of a node diagram provided by an embodiment of the present invention is shown;
[0044] Figure 6 A schematic diagram of the structure of a prison sentence prediction device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0045] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0046] A flowchart of a method for predicting prison terms provided by an embodiment of the present invention is shown below: Figure 1 As shown, it may include:
[0047] Step S11: Obtain target case information, wherein the target case information represents whether various judicial elements related to the sentence exist in the case of the sentence to be predicted.
[0048] In the embodiment of the present invention, a variety of judicial factors related to the prison term are predefined. When it is necessary to predict the prison term that is suitable for a certain case (recorded as case A for the sake of ease of description), it is possible to first determine whether each of the above-mentioned judicial factors exists in the case A, and the determination result is the target case information of the case A. For example, assuming that the various judicial factors related to the prison term are the three following: below 80 mg / ml, driving at a speed seriously exceeding the prescribed speed, and pursuit and driving (it should be noted that this is only an exemplary description and does not constitute a limitation on the scheme of the present invention. There may be more other judicial factors in actual situations, which are not described one by one here). Based on the three judicial factors related to the prison term (below 80 mg / ml, driving at a speed seriously exceeding the prescribed speed, and pursuit and driving), the target case information of case A may be any one of the following eight types of case information. One of them is: (yes, yes, yes), (yes, yes, no), (yes, no, yes), (yes, no, no), (no, yes, yes), (no, yes, no), (no, no, no), taking the target case information of (below 80mg / ml, driving seriously exceeding the prescribed speed, chasing and driving) = (yes, no, no) as an example, it represents the case A that has the judicial element of below 80mg / ml, does not have the judicial element of driving seriously exceeding the prescribed speed, and does not have the judicial element of chasing and driving.
[0049] Among them, the various judicial factors related to the sentence can be determined in the following ways:
[0050] For each crime that needs to predict the sentence, select case data related to the crime from historical cases, that is, select cases that were ultimately convicted of the crime from historical cases. Taking dangerous driving as an example, extract all cases that were ultimately convicted of dangerous driving from historical cases. The selection method for case data related to other crimes is the same as the above method, and will not be listed here one by one.
[0051] Find all the laws applicable to the crime in the extracted cases, and remove the laws that are not related to the sentence (such as fines or general criminal law laws such as the capacity of the person responsible for the accident), and only keep the laws related to the sentence. For example, the laws related to the crime of dangerous driving include Article 133-1, Articles 52, 53, and Articles 66 and 67 of the Criminal Law. Among them, Articles 52 and 53 are removed because they are related to fines and have nothing to do with the sentence. The laws related to the crime of dangerous driving only retain Article 133-1 and Articles 66 and 67 related to the sentence.
[0052] Judicial elements are extracted based on the legal provisions related to the sentence. The extracted judicial elements are independent of each other. This step can be implemented in combination with the knowledge of judicial experts. Taking Article 133 of the Criminal Law as an example, the following four judicial elements can be extracted based on Article 133 of the Criminal Law:
[0053] Chasing and racing, with serious circumstances;
[0054] Driving a motor vehicle while intoxicated;
[0055] When engaging in school bus business or passenger transport, carrying passengers seriously exceeding the rated capacity, or driving at a speed seriously exceeding the prescribed speed;
[0056] Transporting hazardous chemicals in violation of hazardous chemicals safety management regulations, endangering public safety.
[0057] With the assistance of judicial experts, each judicial factor can be further refined. For example, drunk driving can be further subdivided into the following three specific factors: less than 80mg / 100ml; 80-200mg / 100ml; more than 200mg / 100ml. In the embodiments of the present application, the judicial factors related to the sentence refer to the refined judicial factors.
[0058] Step S12: For each legal provision related to the sentence (referred to as legal provision F for ease of description), the target amount in legal provision F is determined based on the degree of compatibility between each item in legal provision F and the target case information.
[0059] In criminal law articles, each article usually contains multiple clauses, and one clause is a clause. The adaptability of a clause to the case information represents the degree to which the clause is applicable to the target case information. Therefore, the adaptability of a clause to the target case information represents the degree to which the clause is applicable to the target case information. The target clause is the clause in the article F that meets the conditions for adaptability to the target case information. Optionally, the target clause can be the clause in the article F that has the greatest adaptability to the target case information.
[0060] Optionally, if there are at least two items whose compatibility with the target case information meets the conditions, a target item can be selected from the at least two items whose compatibility with the target case information meets the conditions according to preset rules.
[0061] Since a target amount is determined in each article related to the sentence, when the target amounts are determined in all articles related to the sentence, the amount of the target amounts is equal to the number of articles related to the sentence.
[0062] In addition, considering that in actual application, case A may only involve some of the laws related to the sentence, for the laws related to the sentence that case A does not involve, the various items in the laws related to the sentence should not be applicable to case A. Therefore, in the embodiment of the present application, the items of each law include not only the items stipulated in the criminal law, but also a custom item, which is recorded as "none" for the convenience of description. If the target item is "none", it means that case A is irrelevant to the law, that is, the law is not applicable to case A.
[0063] Step S12: Determine the target sentence based on the compatibility of each sentence within the sentence value range with all the determined target amounts.
[0064] The range of the sentence value is all possible sentences for all crimes that need to predict the sentence. The sentence within the range of the sentence value is a discrete value, usually a natural number with months as the unit.
[0065] The compatibility of the sentence with all the determined target payments refers to the compatibility of the sentence with the combination of all the determined target payments, which characterizes the degree to which the sentence is applicable to the combination of all the target payments. The target sentence is the sentence that satisfies the compatibility conditions with all the target payments within the range of the sentence value. Optionally, the target sentence can be the sentence with the greatest compatibility with the group of all the target payments.
[0066] The target sentence is the sentence that is applicable to the case in which the sentence to be predicted is predicted.
[0067] The sentence prediction method provided in the embodiment of the present application obtains the target case information, first determines the target amount according to the adaptability of the legal clauses and the target case information, and then determines the target sentence according to the adaptability of the sentence and the determined target amount. Since the adaptability of the legal clauses and the target case information reflects the degree to which the legal clauses are applicable to the target case information, and the adaptability of the sentence and the determined target amount reflects the degree to which the sentence is applicable to the target amount, it is equivalent to a simulation of the logic of judicial trial, and thus has judicial interpretation. Moreover, the accuracy of the sentence prediction method of the present application is comparable to the accuracy of the sentence prediction method based on neural networks. In other words, the basic application scheme realizes that the sentence prediction process has judicial interpretation on the basis of ensuring the accuracy of the prediction, thereby improving the practicality of sentence prediction.
[0068] In an optional embodiment, the degree of compatibility between each clause in the legal article F and the target case information may be determined based on the distribution of the degree of compatibility between pre-learned legal clauses and case information.
[0069] The distribution of the degree of fit between the items in Article F and the case information can be learned based on a Bayesian network (for ease of description, referred to as the first Bayesian network).
[0070] like Figure 2As shown, it is a structural diagram of the first Bayesian network provided in an embodiment of the present application, the parent nodes in the first Bayesian network are the various judicial elements related to the sentence, and each of the various judicial elements related to the sentence is a parent node, the child nodes in the first Bayesian network are the legal provisions related to the sentence, and each legal provision related to the sentence is a child node, and each judicial element related to the sentence is the parent node of all legal provisions related to the sentence. The first Bayesian network reflects the causal relationship between the combination of judicial elements and the amount.
[0071] For a case, the combination of judicial elements represents whether the various judicial elements related to the sentence appear in the case. Figure 2 As shown, there are n judicial factors related to the sentence, and each judicial factor has two possible values: yes and no. That is, if the judicial factor takes the value of yes, it means that the judicial factor appears in the case, and if the judicial factor takes the value of no, it means that the judicial factor does not appear in the case. Therefore, there are 2 combinations of judicial factors related to the sentence. n Each situation corresponds to a case information, and the degree of fit between each case information and each legal clause constitutes the distribution of the degree of fit between the legal clause and the case information.
[0072] The above-mentioned embodiment introduces the process of extracting judicial elements related to the sentence. The following describes the process of learning the distribution of the degree of fit between legal clauses and case information.
[0073] In the embodiment of the present application, the joint probability distribution of the usage clause and the case information represents the adaptability of the usage clause and the case information. According to the association relationship between the parent and child nodes in the Bayesian network, it can be obtained:
[0074]
[0075] Where P(T=a,X1,...,X n ) represents the item a in the legal provision T and the case information (X1,...,X n ), P(T=a|X1,...,X n ) means that the item a in the legal clause T is known to be n ) value, P(X i ) represents the judicial element X i probability.
[0076] Next, we use the maximum likelihood method to estimate the parent nodes (i.e., judicial elements X i ). Specifically,
[0077] First, we obtain each parent node (denoted as X) through the historical cases extracted above. i)’s likelihood function:
[0078]
[0079] Where D is the set of all historical cases extracted, and the number of cases in this set is h, d j represents the jth case in the set, X i (d j ) indicates that the jth case has a i The value of (yes or no), P(X i (d j ):θ) represents the parameter θ in the probability distribution P i Given the jth case d j Judicial Elements X i The value is X i (d j ), therefore, the likelihood function is about the parameter θ in the judicial factor distribution P i The probability of a certain historical case set D appearing under θ. Since D is known, we need to find a certain θ i The probability of D appearing is maximized.
[0080] Since the judicial elements as parent nodes in the first Bayesian network are all binary, the probability distribution of judicial elements can be represented by Bernoulli distribution. Therefore, the parameter θ i Represent the judicial factor X under Bernoulli distribution i The probability of taking the value "yes". Therefore, the above likelihood function can be simplified to
[0081]
[0082] Among them, h is the total number of historical cases in set D, h1 is the number of cases in judicial factor X i The number of cases for which the value of is yes.
[0083] Taking the derivative of the likelihood function and setting the derivative equal to zero, we get:
[0084]
[0085] It can be seen that under the Bernoulli distribution, the judicial factor X i The probability of taking the value "yes" is the judicial factor X i The frequency of taking the value is yes, so the following equation exists:
[0086]
[0087]
[0088] As for the child nodes (i.e., legal provisions), since some legal provisions have more than two clauses, it is difficult to directly assume which probability distribution each clause follows. Therefore, it is not appropriate to use the maximum likelihood algorithm. However, due to the large number of judicial cases, the central limit theorem can be used to directly express the probability by the frequency of each clause appearing in historical cases with known judicial elements. Therefore, we can get:
[0089] P(T=a,X1,...,X n )=frequency(a|X1,...,X n )
[0090] frequency(a|X1,...,X n ) means that the amount a is known to be (X1,...,X n ) value.
[0091] In an optional embodiment, the degree of fitness of each sentence within the range of sentence values and all determined target amounts may be determined based on the distribution of fitness of pre-learned sentences and legal provisions.
[0092] The distribution of the degree of fit between the sentence and the legal clauses can be learned based on a Bayesian network (for ease of description, it is recorded as the second Bayesian network).
[0093] like Figure 3 As shown, it is a schematic diagram of the structure of the second Bayesian network provided in the embodiment of the present application. The parent node in the second Bayesian network is the legal provision related to the sentence, and each legal provision related to the sentence is a parent node. The child nodes in the second Bayesian network are the sentences within the range of sentence values, and each sentence is a child node. Each legal provision related to the sentence is the parent node of all sentences within the range of sentence values. The possible values of each legal provision are the various items included in the legal provision, that is, each item included in the legal provision constitutes a possible value of the legal provision. The second Bayesian network embodies the causal relationship between the combination of legal provisions and the sentence period. Assuming that there are a total of m legal provisions related to the sentence, among which the number of legal provisions contained in the i-th (i=1, 2, ..., m) legal provision Fi is Ki, then the combination of legal provisions has a total of kind of situation.
[0094] The learning process of the fitness distribution between sentences and legal clauses is the same as the learning process of the fitness distribution between legal clauses and case information mentioned above, and will not be repeated here.
[0095] Specifically, the distribution of the adaptability between the pre-learned sentences and legal provisions is as follows:
[0096] The probability distribution of the sentence under the conditions of the legal clauses learned from historical judicial cases is multiplied by the multiplication result of the probability that each item in the legal clause related to the sentence exists in the historical judicial cases, and the distribution of the fitness between the sentence and the legal clause is obtained; the specific formula can be expressed as:
[0097]
[0098] Among them, P(Term,T1,...,T m ) represents the sentence Term and m legal provisions (T1,...,T m )’s fitness, T i represents the value of the i-th law, P(T i ) represents the probability of the i-th law under this value.
[0099] Among them, the probability of each amount existing in a historical judicial case is: the frequency of the amount appearing in historical judicial cases.
[0100] In the process of implementing this application, if the inventor directly predicts the sentence based on a Bayesian network, it is necessary to consider the following: Figure 4 The network structure shown in the figure is used for prediction. In this case, all nodes (judicial elements and legal provisions) in the network need to be known, which requires both judicial element nodes and legal provision nodes as model inputs. However, in real scenarios, we can only get case descriptions most of the time, and we do not know the specific legal provisions involved in the case (although judicial experts can make judgments through case descriptions, when the number of cases is large, only an approximate range can be determined, and it is not possible to accurately determine which legal provisions), so the prediction accuracy is low. In addition, due to the large number of nodes, a large amount of memory is required when storing the joint probability distribution, and a long time is required when calling the distribution, and the prediction efficiency is low everywhere. Based on this, the sentence prediction method provided in the embodiment of the present application predicts the sentence based on two independent Bayesian networks. Compared with predicting the sentence using a Bayesian network, it not only has a small demand for memory and high prediction efficiency, but also has low requirements for users, and does not require them to have high judicial knowledge.
[0101] In an optional embodiment, in order to intuitively reflect the trial logic, the degree of fitness of each target amount and the target case information may be output, or the degree of fitness of each sentence within the sentence value range and all determined target amounts may be output, or both the degree of fitness of each target amount and the target case information and the degree of fitness of each sentence within the sentence value range and all determined target amounts may be output.
[0102] In an optional embodiment, in addition to outputting the degree of compatibility between the target payment and the target case information, the degree of compatibility between other payments and the target case information can also be output, which can reflect a more detailed trial logic.
[0103] Optionally, the above fitness degree may be output in a predetermined format, for example, the above fitness degree may be output in a table form.
[0104] Furthermore, in order to more intuitively reflect the logic of the trial, the degree of compatibility between each clause in each legal provision related to the sentence and the target case information can be output in the form of a node graph;
[0105] and / or,
[0106] The degree of compatibility between each sentence within the sentence value range and all the determined target amounts is output in the form of a node graph.
[0107] The nodes in the node graph can be distributed in layers, where judicial elements are located in one layer, legal provisions are located in one layer, and sentences are located in another layer. Figure 5 As shown, it is an example diagram of a node diagram provided in an embodiment of the present application, in which judicial elements are located at the first layer, legal provisions are located at the second layer, and sentences are located at the third layer.
[0108] The first-level judicial element nodes are marked with the value of the judicial element (yes or no), and the second-level legal provision nodes are marked with the target legal provision (such as Figure 5 The sentence node of the third layer is recorded as the target sentence.
[0109] Corresponding to the method embodiment, the embodiment of the present application also provides a sentence prediction device. The structural schematic diagram of the sentence prediction device provided by the embodiment of the present application is as follows: Figure 6 As shown, it may include:
[0110] Acquisition module 61, first prediction module 62 and second prediction module 63; wherein,
[0111] The acquisition module 61 is used to acquire target case information, wherein the target case information represents whether various judicial elements related to the sentence exist in the case of the sentence to be predicted;
[0112] The first prediction module 62 is used to determine the target amount in each legal provision related to the sentence according to the degree of compatibility between each amount in the legal provision and the target case information;
[0113] The second prediction module 63 is used to determine the target sentence according to the degree of compatibility between each sentence within the sentence value range and all the determined target amounts.
[0114] The sentence prediction device provided in the embodiment of the present application obtains the target case information, first determines the target amount according to the adaptability of the legal clauses and the target case information, and then determines the target sentence according to the adaptability of the sentence and the determined target amount. Since the adaptability of the legal clauses and the target case information reflects the degree to which the legal clauses are applicable to the target case information, and the adaptability of the sentence and the determined target amount reflects the degree to which the sentence is applicable to the target amount, it is equivalent to a simulation of the logic of judicial trial, and thus has judicial interpretation. Moreover, the accuracy of the sentence prediction method of the present application is comparable to the accuracy of the sentence prediction method based on the neural network. In other words, the basic application scheme realizes that the sentence prediction process has judicial interpretation on the basis of ensuring the accuracy of the prediction, thereby improving the practicality of the sentence prediction.
[0115] In an optional embodiment, the first prediction module 62 includes:
[0116] A first determination unit is used to determine the degree of compatibility between each clause in the legal provision and the target case information according to the distribution of the degree of compatibility between the pre-learned legal provisions and the case information;
[0117] The second determination unit is used to determine the clause in the legal provision that has the greatest degree of compatibility with the target case information as the target clause in the legal provision.
[0118] In an optional embodiment, the distribution of the adaptability between the pre-learned legal clauses and the case information is as follows:
[0119] The probability distribution of the legal clauses learned from historical judicial cases under the condition of case information is multiplied by the multiplication result of the probability of each judicial element related to the sentence existing in the case, and the distribution of the fitness of the legal clauses and the case information is obtained;
[0120] Among them, the probability of each judicial element existing in the case is: the ratio of the number of historical judicial cases containing this judicial element to the total number of historical judicial cases.
[0121] In an optional embodiment, the second prediction module 63 may include:
[0122] A third determination unit is used to determine the degree of fit between each sentence within the range of sentence values and all the determined target amounts according to the distribution of the degrees of fit between the sentences and legal clauses learned in advance;
[0123] The fourth determination unit is used to determine the sentence with the greatest degree of adaptability to all the determined target amounts as the target sentence.
[0124] In an optional embodiment, the distribution of the adaptability of the pre-learned prison terms to the legal provisions is as follows:
[0125] The probability distribution of the sentence under the conditions of the legal clauses learned from historical judicial cases is multiplied by the probability of each clause in the legal clause related to the sentence existing in historical judicial cases to obtain the distribution of the fitness of the sentence and the legal clause;
[0126] Among them, the probability of each amount existing in a historical judicial case is: the frequency of the amount appearing in historical judicial cases.
[0127] In an optional embodiment, an output module may also be included, for:
[0128] At least output the degree of compatibility between each target item and the target case information;
[0129] and / or,
[0130] Output the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts.
[0131] In an optional embodiment, the output module may be specifically used for:
[0132] Output the degree of compatibility between each clause in each legal provision related to the sentence and the target case information in the form of a node graph;
[0133] and / or,
[0134] The degree of compatibility between each sentence within the sentence value range and all the determined target amounts is output in the form of a node graph.
[0135] The sentence prediction device includes a processor and a memory. The acquisition module 61, the first prediction module 62, the second prediction module 63, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
[0136] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the sentence prediction can be achieved by adjusting the kernel parameters.
[0137] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0138] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the sentence prediction method is implemented.
[0139] An embodiment of the present invention provides a processor, which is used to run a program, wherein the sentence prediction method is executed when the program is running.
[0140] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, the following steps are implemented:
[0141] Obtaining target case information, wherein the target case information indicates whether various judicial elements related to the sentence exist in the case of the sentence to be predicted;
[0142] For each legal provision related to the sentence, the target amount in the legal provision is determined according to the degree of compatibility between each amount in the legal provision and the target case information;
[0143] The target sentence is determined based on the compatibility of each sentence within the range of sentence values with all the determined target amounts.
[0144] Optionally, determining the target clause in the legal provision according to the degree of compatibility between each clause in the legal provision and the target case information includes:
[0145] According to the distribution of the adaptability of the pre-learned legal clauses and case information, determine the adaptability of each clause in the legal clause to the target case information;
[0146] The clause in the law that has the greatest degree of compatibility with the target case information is determined as the target clause in the law.
[0147] Optionally, the distribution of the adaptability between the pre-learned legal clauses and the case information is as follows:
[0148] The probability distribution of the legal clauses learned from historical judicial cases under the condition of case information is multiplied by the multiplication result of the probability of each judicial element related to the sentence existing in the case, and the distribution of the fitness of the legal clauses and the case information is obtained;
[0149] Among them, the probability of each judicial element existing in the case is: the ratio of the number of historical judicial cases containing this judicial element to the total number of historical judicial cases.
[0150] Optionally, determining the target sentence based on the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts includes:
[0151] According to the distribution of the fitness of the sentences and legal clauses learned in advance, determine the fitness of each sentence within the range of the sentence value and all the determined target clauses;
[0152] The target sentence is determined to be the sentence that best matches all the target payments identified.
[0153] Optionally, the distribution of the fitness of the pre-learned prison terms and legal provisions is as follows:
[0154] The probability distribution of the sentence under the conditions of the legal clauses learned from historical judicial cases is multiplied by the probability of each clause in the legal clause related to the sentence existing in historical judicial cases to obtain the distribution of the fitness of the sentence and the legal clause;
[0155] Among them, the probability of each amount existing in a historical judicial case is: the frequency of the amount appearing in historical judicial cases.
[0156] Optionally, also include:
[0157] At least output the degree of compatibility between each target item and the target case information;
[0158] and / or,
[0159] Output the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts.
[0160] Optionally, the outputting of at least the degree of compatibility between each item in each legal provision related to the sentence and the target case information; and / or the outputting of the degree of compatibility between each sentence within the range of the sentence value and all the determined target items, includes:
[0161] Output the degree of compatibility between each clause in each legal provision related to the sentence and the target case information in the form of a node graph;
[0162] and / or,
[0163] The degree of compatibility between each sentence within the sentence value range and all the determined target amounts is output in the form of a node graph.
[0164] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0165] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the following method steps:
[0166] Obtaining target case information, wherein the target case information indicates whether various judicial elements related to the sentence exist in the case of the sentence to be predicted;
[0167] For each legal provision related to the sentence, the target amount in the legal provision is determined according to the degree of compatibility between each amount in the legal provision and the target case information;
[0168] The target sentence is determined based on the compatibility of each sentence within the range of sentence values with all the determined target amounts.
[0169] Optionally, determining the target clause in the legal provision according to the degree of compatibility between each clause in the legal provision and the target case information includes:
[0170] According to the distribution of the adaptability of the pre-learned legal clauses and case information, determine the adaptability of each clause in the legal clause to the target case information;
[0171] The clause in the law that has the greatest degree of compatibility with the target case information is determined as the target clause in the law.
[0172] Optionally, the distribution of the adaptability between the pre-learned legal clauses and the case information is as follows:
[0173] The probability distribution of the legal clauses learned from historical judicial cases under the condition of case information is multiplied by the multiplication result of the probability of each judicial element related to the sentence existing in the case, and the distribution of the fitness of the legal clauses and the case information is obtained;
[0174] Among them, the probability of each judicial element existing in the case is: the ratio of the number of historical judicial cases containing this judicial element to the total number of historical judicial cases.
[0175] Optionally, determining the target sentence based on the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts includes:
[0176] According to the distribution of the fitness of the sentences and legal clauses learned in advance, determine the fitness of each sentence within the range of the sentence value and all the determined target clauses;
[0177] The target sentence is determined to be the sentence that best matches all the target payments identified.
[0178] Optionally, the distribution of the fitness of the pre-learned prison terms and legal provisions is as follows:
[0179] The probability distribution of the sentence under the conditions of the legal clauses learned from historical judicial cases is multiplied by the probability of each clause in the legal clause related to the sentence existing in historical judicial cases to obtain the distribution of the fitness of the sentence and the legal clause;
[0180] Among them, the probability of each amount existing in a historical judicial case is: the frequency of the amount appearing in historical judicial cases.
[0181] Optionally, also include:
[0182] At least output the degree of compatibility between each target item and the target case information;
[0183] and / or,
[0184] Output the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts.
[0185] Optionally, the outputting of at least the degree of compatibility between each item in each legal provision related to the sentence and the target case information; and / or the outputting of the degree of compatibility between each sentence within the range of the sentence value and all the determined target items, includes:
[0186] Output the degree of compatibility between each clause in each legal provision related to the sentence and the target case information in the form of a node graph;
[0187] and / or,
[0188] The degree of compatibility between each sentence within the sentence value range and all the determined target amounts is output in the form of a node graph.
[0189] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0190] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0191] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0193] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0194] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0195] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0196] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0197] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0198] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for predicting prison terms, characterized in that: include: Obtaining target case information, wherein the target case information indicates whether various judicial elements related to the sentence exist in the case of the sentence to be predicted; For each legal provision related to the sentence, the target amount in the legal provision is determined according to the degree of compatibility between each amount in the legal provision and the target case information; Determine the target sentence based on the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts; Determining the target item in the article according to the degree of compatibility between each item in the article and the target case information includes: According to the distribution of the adaptability of the pre-learned legal clauses and case information, determine the adaptability of each clause in the legal clause to the target case information; The clause in the law that has the greatest degree of compatibility with the target case information is determined as the target clause in the law.
2. The method according to claim 1, characterized in that The distribution of the adaptability between the pre-learned legal clauses and case information is as follows: The probability distribution of the legal clauses learned from historical judicial cases under the condition of case information is multiplied by the multiplication result of the probability of each judicial element related to the sentence existing in the case, and the distribution of the fitness of the legal clauses and the case information is obtained; Among them, the probability of each judicial element existing in the case is: the ratio of the number of historical judicial cases containing this judicial element to the total number of historical judicial cases.
3. The method according to claim 1, characterized in that The target sentence is determined based on the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts, including: According to the distribution of the fitness of the sentences and legal clauses learned in advance, determine the fitness of each sentence within the range of the sentence value and all the determined target clauses; The target sentence is determined to be the sentence that best matches all the target payments identified.
4. The method according to claim 3, characterized in that The distribution of the fitness of the pre-learned prison terms and legal provisions is as follows: The probability distribution of the sentence under the conditions of the legal clauses learned from historical judicial cases is multiplied by the probability of each clause in the legal clause related to the sentence existing in historical judicial cases to obtain the distribution of the fitness of the sentence and the legal clause; Among them, the probability of each amount existing in a historical judicial case is: the frequency of the amount appearing in historical judicial cases.
5. The method according to claim 1, characterized in that Also includes: At least output the degree of compatibility between each target item and the target case information; and / or, Output the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts.
6. The method according to claim 5, characterized in that The output of at least the degree of compatibility between each clause in each legal provision related to the sentence and the target case information; And / or, output the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts, including: Output the degree of compatibility between each clause in each legal provision related to the sentence and the target case information in the form of a node graph; and / or, The degree of compatibility between each sentence within the sentence value range and all the determined target amounts is output in the form of a node graph.
7. A prison sentence prediction device, characterized in that: include: An acquisition module, used to acquire target case information, wherein the target case information represents whether various judicial elements related to the sentence exist in the case of the sentence to be predicted; The first prediction module is used to determine the target amount in each legal provision related to the sentence according to the degree of compatibility between each amount in the legal provision and the target case information; The second prediction module is used to determine the target sentence according to the degree of compatibility between each sentence within the range of sentence values and all the determined target amounts; Determining the target item in the article according to the degree of compatibility between each item in the article and the target case information includes: According to the distribution of the adaptability of the pre-learned legal clauses and case information, determine the adaptability of each clause in the legal clause to the target case information; The clause in the law that has the greatest degree of compatibility with the target case information is determined as the target clause in the law.
8. A storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the sentence prediction method described in any one of claims 1 to 6.
9. A device, comprising at least one processor, and at least one memory and bus connected to the processor; wherein: The processor and the memory communicate with each other via the bus; The processor is used to call the program instructions in the memory to execute the sentence prediction method as described in any one of claims 1-6.
