Case element extraction method, device, electronic device and storage medium

By preserving multiple case and preset extraction models in electronic devices, selecting target models for semantic feature extraction and matching of case elements based on the case origin to which the case belongs, the problem of low accuracy of case elements extraction in the existing technology is solved, and the more Accurate and comprehensive information extraction.

CN114792099BActive Publication Date: 2024-12-27CHENGDU UNION BIG DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210428371.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-22
Publication Date
2024-12-27
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

The prior art When extracting case elements in legal cases, due to the diversity of language expression, the accuracy is low and the information of the case cannot be effectively extracted.

Method used

By preserving multiple cases and each case corresponding to the preset extraction model in the electronic device, the target extraction model is selected based on the target case to which the case to be processed belongs, the fact text is featured, semantic features are obtained, and case elements matching are extracted are extracted. , consider the relationship between case elements to improve the accuracy of extraction.

Benefits of technology

It improves the accuracy of case elements, avoids interference from linguistic expression, and ensures that the extracted information is comprehensive and perfect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114792099B_ABST
    Figure CN114792099B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of natural language processing, and provides a case element extraction method, device, electronic device and storage medium. By pre-storing multiple case causes and preset extraction models corresponding to each case cause in an electronic device, according to the target case cause to which the case to be processed belongs, a target extraction model corresponding to the target case cause is selected from all preset extraction models; then, through the target extraction model, feature extraction is performed on the factual text of the case to be processed to obtain the semantic features of the factual text; and then, through the target extraction model, case elements matching the semantic features are extracted to obtain the case elements of the case to be processed. By obtaining the semantic features of the factual text and extracting the case elements matching it, the interference of language expression is avoided based on the semantic information of the case facts, and the accuracy of extracting case elements is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing, and in particular to a case element extraction method, device, electronic device and storage medium. Background Art

[0002] At present, for legal cases, case elements are generally extracted through regular expressions or TF-IDF technology. However, due to the diversity of language expression, there are different expressions in the case material text. Therefore, these technologies have the problem of low accuracy of case elements and inability to extract effective information of the case. Summary of the invention

[0003] In view of this, an object of the present invention is to provide a case element extraction method, device, electronic device and storage medium.

[0004] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:

[0005] In a first aspect, the present invention provides a case element extraction method, which is applied to an electronic device, wherein the electronic device pre-stores a plurality of case causes and a preset extraction model corresponding to each of the case causes, and the method comprises:

[0006] According to the target case to which the case to be processed belongs, a target extraction model corresponding to the target case is selected from all preset extraction models;

[0007] By using the target extraction model, feature extraction is performed on the factual text of the case to be processed to obtain semantic features of the factual text;

[0008] The case elements matching the semantic features are extracted through the target extraction model to obtain the case elements of the case to be processed.

[0009] The beneficial effect of the above implementation is that by acquiring the semantic features of the factual text and extracting the case elements matching it, the interference of language expression is avoided based on the semantic information of the case facts, thereby improving the accuracy of extracting the case elements.

[0010] In an optional implementation, each case cause has multiple case elements; the target extraction model includes a target element relationship, and the target element relationship represents the relationship between all target case elements in the target case cause;

[0011] The step of extracting case elements matching the semantic features through the target extraction model to obtain the case elements of the case to be processed includes:

[0012] Determining a first matching value between each of the target case elements and the semantic feature through the target extraction model;

[0013] By using the target extraction model, each first prediction value is obtained based on each first matching value; each first prediction value represents a first matching relationship between each target case element and the semantic feature;

[0014] By means of the target extraction model, each second prediction value is obtained based on each first matching value, each first prediction value and the target element relationship; each second prediction value represents a second matching relationship between each target case element and the semantic feature;

[0015] According to the second matching relationship between each of the target case elements and the semantic feature, the case elements of the case to be processed are obtained.

[0016] The beneficial effect of the above implementation is that the relationship between case elements is also used as the basis for extracting case elements, thereby making the extracted case elements more comprehensive and complete, and further improving the accuracy of extracting case elements.

[0017] In an optional embodiment, the target extraction model includes a feature extraction layer;

[0018] The step of extracting features from the factual text of the case to be processed by the target extraction model to obtain semantic features of the factual text includes:

[0019] Performing feature extraction on the factual text through the feature extraction layer in the target extraction model to obtain a word vector, a sentence vector and a position vector with the same dimensions;

[0020] The word vector represents a word in the factual text, the sentence vector represents a sentence in the factual text, and the position vector represents the position of a word in the factual text;

[0021] The word vector, the sentence vector and the position vector are superimposed through the feature extraction layer in the target extraction model to obtain a first vector representing the semantic features of the factual text.

[0022] The above implementation has the beneficial effect of extracting the features of the factual text from words, sentences and word locations, that is, from multiple dimensions based on the feature extraction layer, thereby making the extracted semantic features more accurate.

[0023] In an optional embodiment, the first vector represents the semantic feature; the target extraction model includes a fully connected layer, and the fully connected layer in the target extraction model includes a feature space composed of all target case elements;

[0024] The step of determining the first matching value between each of the target case elements and the semantic feature through the target extraction model includes:

[0025] Mapping the first vector to the feature space through a fully connected layer in the target extraction model to obtain a second vector having the same dimension as the total number of all target case elements;

[0026] Each element in the second vector represents a first matching value between each of the target case elements and the semantic feature.

[0027] The beneficial effect of the above implementation is that the first vector is converted into a second vector having the same dimension as the total number of all case elements in the case, that is, the matching of case elements and semantic features is achieved through dimensional transformation between vectors, thereby improving the processing speed and efficiency.

[0028] In an optional embodiment, the target extraction model includes an activation function layer;

[0029] The step of obtaining each first prediction value based on each first matching value by using the target extraction model comprises:

[0030] Normalizing each of the first matching values ​​through an activation function layer in the target extraction model to obtain a first matching probability between each of the target case elements and the semantic feature;

[0031] By means of the activation function layer in the target extraction model, the first prediction value corresponding to the first matching probability less than a preset threshold is set to a first value, and the first prediction value corresponding to the first matching probability greater than or equal to the preset threshold is set to a second value, to obtain each of the first prediction values;

[0032] Among them, the first prediction value is that the first numerical value indicates that the first matching relationship between the corresponding target case element and the semantic feature is mismatched; the first prediction value is that the second numerical value indicates that the first matching relationship between the corresponding target case element and the semantic feature is matched.

[0033] The above implementation has the beneficial effect of converting the first matching value with a larger numerical value into a first matching probability of the same measure, so as to quickly determine the first matching relationship between the target case element and the semantic feature according to the first matching probability, thereby improving the processing speed and efficiency.

[0034] In an optional embodiment, the target element relationship includes parameters of each of the target case elements, and the target extraction model includes an element relationship layer;

[0035] The step of obtaining each second prediction value based on each first matching value, each first prediction value and the target element relationship through the target extraction model comprises:

[0036] The product of the parameter of each target case element and its corresponding first prediction value is calculated through the element relationship layer in the target extraction model, and the first matching value corresponding to each target case element is added to the product corresponding to all target case elements to obtain the second matching value of each target case element and the semantic feature;

[0037] Normalizing each of the second matching values ​​through the element relationship layer in the target extraction model to obtain a second matching probability between each of the target case elements and the semantic feature;

[0038] By means of the element relationship layer in the target extraction model, the second prediction value corresponding to the second matching probability less than the preset threshold is set as the first value, and the second prediction value corresponding to the second matching probability greater than or equal to the preset threshold is set as the second value, to obtain each of the second prediction values;

[0039] Among them, the second prediction value is the first value indicating that the second matching relationship between the corresponding target case element and the semantic feature is mismatched; the second prediction value is the first value indicating that the second matching relationship between the corresponding target case element and the semantic feature is matched.

[0040] The beneficial effect of the above implementation is that the element relationship is also used as the basis for extracting case elements, thereby taking into account the correlation between elements, making the extracted case elements more comprehensive and complete, and improving the accuracy of extracting case elements.

[0041] In an optional implementation manner, any one of the preset extraction models is obtained in the following manner:

[0042] Based on legal norms and multiple historical cases of the case, construct multiple case elements of the case;

[0043] Based on the multiple case elements of the case, each case sample of the case is labeled to obtain each case sample with an element label;

[0044] The basic model is trained according to all case samples with element labels of the case cause to obtain a preset extraction model corresponding to the case cause.

[0045] The beneficial effect of the above implementation is that a preset extraction model corresponding to multiple case elements and case samples of a case cause is obtained, which can be used to extract case elements of the case belonging to the case cause, thereby improving the accuracy of extracting case elements.

[0046] In a second aspect, the present invention provides a case element extraction device, which is applied to an electronic device, wherein the electronic device pre-stores a plurality of case causes and a preset extraction model corresponding to each of the case causes, and the device comprises:

[0047] A selection module, used to select a target extraction model corresponding to the target case from all preset extraction models according to the target case to which the case to be processed belongs;

[0048] A feature extraction module, used to extract features of the factual text of the case to be processed through the target extraction model to obtain semantic features of the factual text;

[0049] The element extraction module is used to extract the case elements matching the semantic features through the target extraction model to obtain the case elements of the case to be processed.

[0050] In a third aspect, the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any one of the aforementioned embodiments is implemented.

[0051] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any one of the aforementioned embodiments.

[0052] The case element extraction method, device, electronic device and storage medium provided by the embodiments of the present invention pre-store multiple case causes and preset extraction models corresponding to each case cause in the electronic device, and select the target extraction model corresponding to the target case cause from all preset extraction models according to the target case cause to which the case to be processed belongs; then, through the target extraction model, feature extraction is performed on the factual text of the case to be processed to obtain the semantic features of the factual text; and then, through the target extraction model, case elements matching the semantic features are extracted to obtain the case elements of the case to be processed. Compared with the prior art that directly obtains the text of the set pattern from the case material text, the present invention obtains the semantic features of the factual text and extracts the case elements matching it, thereby avoiding the interference of language expression based on the semantic information of the case facts and improving the accuracy of extracting case elements.

[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] 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.

[0055] Figure 1 A block diagram of an electronic device provided by an embodiment of the present invention is shown;

[0056] Figure 2 A schematic diagram of a process of extracting case elements provided by an embodiment of the present invention is shown;

[0057] Figure 3 Another schematic diagram of a process of extracting case elements provided by an embodiment of the present invention is shown;

[0058] Figure 4 Another schematic diagram of a process of extracting case elements provided by an embodiment of the present invention is shown;

[0059] Figure 5 Another schematic diagram of a process of extracting case elements provided by an embodiment of the present invention is shown;

[0060] Figure 6 A functional module diagram of a case element extraction device provided in an embodiment of the present invention is shown.

[0061] Icon: 110 - bus; 120 - processor; 130 - memory; 150 - I / O module; 170 - communication interface; 300 - case element extraction device; 310 - selection module; 330 - feature extraction module; 350 - element extraction module; 370 - training module. DETAILED DESCRIPTION

[0062] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0063] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0064] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0065] At present, for legal cases, case elements are generally extracted through regular expressions or TF-IDF technology. For example, regular expressions directly select text that meets the set expression template from the case material text to extract case elements. TF-IDF technology extracts case elements by counting the frequency of occurrence of set words in the case material text. Due to the diversity of language expression, there are different ways of expression in the case material text. Therefore, these technologies have the problem of low accuracy of case elements and inability to extract effective information of the case. Furthermore, an embodiment of the present invention provides a case element extraction method to solve the above problems.

[0066] Please refer to Figure 1 , is a block diagram of an electronic device provided by an embodiment of the present invention. The electronic device includes a bus 110 , a processor 120 , a memory 130 , an I / O module 150 , and a communication interface 170 .

[0067] The bus 110 may be a circuit that connects the above elements to each other and transfers communications (eg, control messages) between the above elements.

[0068] The processor 120 may receive commands from the other elements described above (eg, the memory 130 , the I / O module 150 , the communication interface 170 , etc.) through the bus 110 , may interpret the received commands, and may perform calculations or data processing according to the interpreted commands.

[0069] The processor 120 may be an integrated circuit chip with signal processing capabilities. The processor 120 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0070] The memory 130 may store commands or data received from the processor 120 or other elements (eg, the I / O module 150 , the communication interface 170 , etc.) or commands or data generated by the processor 120 or other elements.

[0071] The memory 130 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), or an electrically erasable programmable read-only memory (EEPROM).

[0072] The I / O module 150 may receive commands or data input from a user via input-output means (e.g., a sensor, a keyboard, a touch screen, etc.), and may transmit the received commands or data to the processor 120 or the memory 130 via the bus 110. It is also used to display various information (e.g., multimedia data, text data) received, stored, and processed from the above elements, and may display videos, images, data, etc. to the user.

[0073] The communication interface 170 may be used to communicate signaling or data with other node devices.

[0074] Understandably, Figure 1 The structure shown is only a schematic diagram of the structure of the electronic device. The electronic device may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0075] The electronic device provided in the embodiment of the present invention may be a smart phone, a personal computer, a tablet computer, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiment of the present invention does not impose any limitation on this.

[0076] The above-mentioned electronic device will be used as an execution subject to execute each step in each method provided in the embodiment of the present invention and achieve corresponding technical effects.

[0077] See also Figure 2 , Figure 2 It is a flowchart of a case element extraction method provided in an embodiment of the present invention.

[0078] Step S202, according to the target case to which the case to be processed belongs, selecting a target extraction model corresponding to the target case from all preset extraction models;

[0079] It should be noted that a plurality of case causes and a preset extraction model corresponding to each case cause are pre-stored in the electronic device.

[0080] The cause of action refers to the name of the case formed by the People's Court after summarizing the nature of the legal relationship involved in the litigation case, which can be understood as the category of the legal relationship of the case. For example, based on the relationship between husband and wife, the causes of action include divorce disputes, custody disputes, etc.; based on the labor relationship, the causes of action include labor disputes, personnel disputes, etc. Different causes of action have different characteristics, so each cause of action has its corresponding preset extraction model.

[0081] In this embodiment, the judgment document of the case to be processed records the case cause to which the case to be processed belongs, namely, the target case cause; based on the target case cause, a preset extraction model corresponding to the target case cause, namely, the target extraction model, can be selected from all preset extraction models.

[0082] Step S204, extracting features from the factual text of the case to be processed through the target extraction model to obtain semantic features of the factual text;

[0083] In this embodiment, the factual text of the case to be processed may be the case fact part in the judgment document. The case fact part in the judgment document is feature extracted by the target extraction model to obtain the semantic features of the case fact part, ie, the factual text.

[0084] Step S206, extracting case elements matching the semantic features through the target extraction model to obtain case elements of the case to be processed;

[0085] In this embodiment, case elements represent elements that constitute the characteristics of a case, which can be understood as key information representing the facts of the case. Based on the semantic features of the obtained factual text, case elements matching the factual text are extracted through the target extraction model, that is, the case elements of the case to be processed are obtained.

[0086] It can be seen that based on the above steps, by pre-storing multiple cases and preset extraction models corresponding to each case in the electronic device, according to the target case to which the case to be processed belongs, the target extraction model corresponding to the target case is selected from all preset extraction models; then, the factual text of the case to be processed is feature extracted through the target extraction model to obtain the semantic features of the factual text; and then, the case elements matching the semantic features are extracted through the target extraction model to obtain the case elements of the case to be processed. Compared with the prior art that directly obtains the text of the set mode from the case material text, the embodiment of the present invention obtains the semantic features of the factual text and extracts the case elements matching it, thereby avoiding the interference of language expression based on the semantic information of the case facts and improving the accuracy of extracting case elements.

[0087] Optionally, the embodiment of the present invention provides a possible implementation method for the above step S204. Figure 3 , wherein step S204 includes the following steps:

[0088] S204-1, extracting features from the factual text through the feature extraction layer in the target extraction model to obtain a word vector, a sentence vector, and a position vector with the same dimensions;

[0089] Among them, the word vector represents the word in the fact text, the sentence vector represents the sentence in the fact text, and the position vector represents the position of the word in the fact text;

[0090] In this embodiment, the target extraction model includes a feature extraction layer, which can adopt a BERT framework, including a word embedding layer, i.e., a token embedding, a sentence embedding layer, i.e., a segment embedding, and a position embedding layer, i.e., a positional embedding.

[0091] Based on the BERT framework, the sentences in the factual text are divided by marking the beginning of the sentence with [CLS] and the end of the sentence with [SEP], and then input into the word embedding layer, sentence embedding layer and position embedding layer to obtain word vectors, sentence vectors and position vectors with the same dimensions, for example, 768 dimensions. The word vector represents each word in the factual text, the sentence vector represents each sentence in the factual text, and the position vector represents the position of each word in the factual text.

[0092] S204-3, superimposing the word vector, the sentence vector and the position vector through the feature extraction layer in the target extraction model to obtain a first vector representing the semantic features of the factual text.

[0093] In this embodiment, the word vector, sentence vector and position vector obtained are superimposed and aggregated through the feature extraction layer in the target extraction model to obtain a first vector, which represents the semantic features of the factual text.

[0094] It can be seen that the feature extraction layer in the target extraction model extracts features from the factual text to obtain word vectors, sentence vectors, and position vectors of the same dimension, and the word vectors, sentence vectors, and position vectors are superimposed to obtain the first vector representing the semantic features of the factual text. Based on the feature extraction layer, the features of the factual text are extracted from words, sentences, and the positions of the words, that is, from multiple dimensions, so that the extracted semantic features are more accurate.

[0095] Optionally, in order to further improve the accuracy of extracting case elements, the embodiment of the present invention provides a possible implementation method for the above step S206. Figure 4 , wherein step S206 includes the following steps:

[0096] Before introducing the specific steps, it is important to understand that, based on the different characteristics of different causes of action, each cause of action has multiple case elements, which are used to represent all the characteristics of its cause of action. Each preset extraction model includes the relationship between all the case elements of its corresponding cause of action. For example, a labor dispute cause of action has 5 case elements, and the preset extraction model corresponding to the labor dispute cause of action includes the relationship between these 5 case elements.

[0097] Step S206-1, determining a first matching value between each target case element and the semantic feature through a target extraction model;

[0098] In this embodiment, the target case includes a plurality of target case elements, and the target extraction template includes the relationship between all target case elements.

[0099] Through the target extraction model, each target case element can be matched with the semantic features of the factual text to determine the first matching value of each target case element and the semantic feature. The first matching value can be understood as the initial matching degree between the target case element and the semantic feature in the preliminary prediction process.

[0100] Step S206-3, obtaining each first prediction value based on each first matching value through the target extraction model; each first prediction value represents a first matching relationship between each target case element and the semantic feature;

[0101] In this embodiment, through the target extraction model, calculations can be performed based on each first matching value to obtain the first prediction value corresponding to each first matching value, that is, to obtain each first prediction value. Each first prediction value represents the first matching relationship between each target case element and the semantic feature. The first matching relationship can be understood as the preliminary matching relationship between the target case element and the semantic feature in the preliminary prediction process, that is, whether it matches.

[0102] Step S206-5, obtaining each second prediction value based on each first matching value, each first prediction value and the target element relationship through the target extraction model; each second prediction value represents the second matching relationship between each target case element and the semantic feature;

[0103] In this embodiment, through the target extraction model, a re-prediction can be performed based on each first matching value, each first prediction value and the target element relationship, that is, the relationship between all target elements, to obtain each second prediction value. Each second prediction value represents the second matching relationship between each target case element and the semantic feature. The second matching relationship can be understood as the final matching relationship between the target case element and the semantic feature in the re-prediction process, that is, whether it matches.

[0104] It is understandable that semantic features may only include part of the semantic information of the factual text. If the case elements of the case to be processed are determined based on the preliminary matching relationship between the initially predicted target case elements and the semantic features, the extracted case elements may be incomplete. However, case elements are often related to each other. Based on the relationship between case elements, the target case elements and semantic features are re-predicted to determine the case elements of the case to be processed based on the final matching relationship, which can make the extracted case elements more comprehensive, thereby further improving the accuracy of the extracted case elements.

[0105] Step S206-7, obtaining the case elements of the case to be processed according to the second matching relationship between each target case element and the semantic feature;

[0106] In this embodiment, according to the second matching relationship between each target case element and the semantic feature, the target case element that matches the second matching relationship with the semantic feature is used as the case element of the case to be processed, that is, the case element of the case to be processed is obtained.

[0107] It can be seen that the first matching value between each target case element and the semantic feature is determined by the target extraction model, and each first prediction value, that is, the first matching relationship between each target case element and the semantic feature, is obtained based on each first matching value; then, the target extraction model is used to obtain each second prediction value, that is, the second matching relationship between each target case element and the semantic feature based on each first matching value, each first prediction value and the target element relationship; finally, the case element of the case to be processed is obtained based on the second matching relationship between each target case element and the semantic feature. The matching relationship between the case element and the semantic feature is predicted again based on the relationship between the case elements, that is, the relationship between the case elements is also used as the basis for extracting the case elements, so that the extracted case elements are more comprehensive and complete, and the accuracy of the extracted case elements is further improved.

[0108] Optionally, based on using the first vector to represent the semantic features of the factual text, an embodiment of the present invention provides a possible implementation method for the above step S206 - 1 .

[0109] The target extraction model includes a fully connected layer, which includes a feature space composed of all target case elements. The first vector can be mapped to the feature space through the fully connected layer in the target extraction model to obtain a second vector, and the dimension of the second vector is the same as the total number of all target case elements and is smaller than the dimension of the first vector. Each element in the second vector represents a first matching value between each target case element and the semantic feature.

[0110] It can be understood that the semantic feature is matched with each target case element constituting the feature space according to the first vector, and a second vector including a first matching value between each target case element and the semantic feature is obtained.

[0111] It can be seen that through the fully connected layer in the target extraction model, the first vector representing the semantic feature is mapped to the feature space, and a second vector with the same dimension as the total number of all target case elements is obtained, that is, the first matching value between each target case element and the semantic feature is obtained. Through the feature space in the fully connected layer, the first vector is converted into a second vector with the same dimension as the total number of all case elements in the case, that is, the matching of case elements and semantic features is achieved through the dimensional transformation between vectors, thereby improving the processing speed and efficiency.

[0112] Optionally, for the above step S206-3, an embodiment of the present invention provides a possible implementation manner, wherein step S206-3 includes the following steps:

[0113] Step S206-3-1, normalizing each first matching value through the activation function layer in the target extraction model to obtain a first matching probability between each target case element and the semantic feature;

[0114] In this embodiment, the target extraction module includes an activation function layer, and each first match value can be normalized by the activation function layer. Optionally, the activation function layer can include a first preset function such as a sigmoid function, and each first match value can be processed based on the sigmoid function, that is, each first match value is converted into a value in the interval [0,1], and the first match probability of each target case element and the semantic feature is obtained. The first match probability can be understood as the possibility of matching the target case element with the semantic feature in the preliminary prediction process.

[0115] Step S206-3-3, through the activation function layer in the target extraction model, the first prediction value corresponding to the first matching probability less than the preset threshold is set to the first value, and the first prediction value corresponding to the first matching probability greater than or equal to the preset threshold is set to the second value, to obtain each first prediction value;

[0116] Among them, the first prediction value is the first numerical value, indicating that the first matching relationship between the corresponding target case element and the semantic feature is mismatched; the first prediction value is the second numerical value, indicating that the first matching relationship between the corresponding target case element and the semantic feature is matched.

[0117] In this embodiment, through the activation function layer in the target extraction model, the activation function layer may include a second preset function such as a likelihood function, and the likelihood function has a parameter, namely a preset threshold.

[0118] Each first matching probability can be processed based on the likelihood function, that is, each first matching probability is compared with the parameter of the likelihood function, the first prediction value corresponding to the first matching probability less than the parameter is set to a first value such as 0, and the first prediction value corresponding to the first matching probability greater than or equal to the parameter is set to a second value such as 1, so as to obtain each first prediction value.

[0119] Each first prediction value represents the first matching relationship between each target case element and the semantic feature. If the first prediction value is a first numerical value such as 0, it means that the first matching relationship between the target case element and the semantic feature corresponding to the first prediction value is not matched. If the first prediction value is a second numerical value such as 1, it means that the first matching relationship between the target case element and the semantic feature corresponding to the first prediction value is matched.

[0120] It can be seen that, through the activation function layer in the target extraction model, each first matching value is normalized to obtain the first matching probability of each target case element and the semantic feature; and based on each first matching probability and the preset threshold, the first prediction value corresponding to the first matching probability less than the preset threshold is set to the first value, which indicates that the first matching relationship is not matched; the first prediction value corresponding to the first matching probability greater than or equal to the preset threshold is set to the second value, which indicates that the first matching relationship is matched, and each first prediction value is obtained to determine the first matching relationship between each target case element and the semantic feature. By converting the first matching value with a larger value into the first matching probability of the same measure, it is convenient to quickly determine the first matching relationship between the target case element and the semantic feature in the preliminary prediction process according to the first matching probability, thereby improving the processing speed and efficiency.

[0121] Optionally, for the above step S206-5, an embodiment of the present invention provides a possible implementation manner, wherein step S206-5 includes the following steps:

[0122] Step S206-5-1, through the element relationship layer in the target extraction model, calculate the product of the parameter of each target case element and its corresponding first prediction value, and add the first matching value corresponding to each target case element and the product corresponding to all target case elements to obtain the second matching value of each target case element and the semantic feature;

[0123] In this embodiment, the target extraction model includes an element relationship layer, and the target element relationship includes parameters of each target case element.

[0124] Through the element relationship layer, the product of the parameter of each target case element and its corresponding first prediction value is calculated. For each target case element, the first matching value corresponding to the target case element is added to the product corresponding to all target case elements to obtain the second matching value of the target case element and the semantic feature. Based on each target case element, each second matching value is obtained. The second matching value can be understood as the final matching degree between the target case element and the semantic feature in the re-prediction process.

[0125] Step S206-5-3, normalizing each second matching value through the element relationship layer in the target extraction model to obtain a second matching probability between each target case element and the semantic feature;

[0126] In this embodiment, the element relationship layer may include a first preset function such as a sigmoid function, and each second matching value may be processed based on the sigmoid function, that is, each second matching value is converted into a value in the interval [0,1], and then the second matching probability of each target case element and the semantic feature is obtained. The second matching probability can be understood as the possibility of matching the target case element and the semantic feature in the re-prediction process.

[0127] Step S206-5-5, through the element relationship layer in the target extraction model, the second prediction value corresponding to the second matching probability less than the preset threshold is set to the first value, and the second prediction value corresponding to the second matching probability greater than or equal to the preset threshold is set to the second value, to obtain each second prediction value;

[0128] Among them, the second prediction value being the first value indicates that the second matching relationship between the corresponding target case element and the semantic feature is mismatched; the second prediction value being the first value indicates that the second matching relationship between the corresponding target case element and the semantic feature is matched.

[0129] In this embodiment, through the element relationship layer in the target extraction model, the element relationship layer may include a second preset function such as a likelihood function, and the likelihood function has a parameter, namely a preset threshold.

[0130] Each second matching probability can be processed based on the likelihood function, that is, each second matching probability is compared with the parameter of the likelihood function, the second prediction value corresponding to the second matching probability less than the parameter is set to the first value such as 0, and the second prediction value corresponding to the second matching probability greater than or equal to the parameter is set to the second value such as 1, so as to obtain each second prediction value.

[0131] Each second prediction value represents the second matching relationship between each target case element and the semantic feature. If the second prediction value is the first value such as 0, it means that the second matching relationship between the target case element and the semantic feature corresponding to the second prediction value is not matched. If the second prediction value is the second value such as 1, it means that the second matching relationship between the target case element and the semantic feature corresponding to the second prediction value is matched.

[0132] It can be seen that, through the element relationship layer in the target extraction model, the product of the parameter of each target case element and its corresponding first prediction value is calculated, and the first matching value corresponding to each target case element and the product corresponding to all target case elements are added to obtain the second matching value of each target case element and the semantic feature; and each second matching value is normalized to obtain the second matching probability of each target case element and the semantic feature; then the second prediction value corresponding to the second matching probability less than the preset threshold is set to the first value, which indicates that the second matching relationship is not matched; the second prediction value corresponding to the second matching probability greater than or equal to the preset threshold is set to the second value, which indicates that the second matching relationship is matched, and each second prediction value is obtained to determine the second matching relationship between each target case element and the semantic feature. The second matching relationship between the target case element and the semantic feature is obtained through the parameters of the target case element, that is, the element relationship is also used as the basis for extracting the case element, thereby taking into account the correlation between the elements, making the extracted case elements more comprehensive and complete, and improving the accuracy of extracting the case elements.

[0133] For ease of understanding, the embodiment of the present invention provides an example, where the case to be processed is case A, and the target case is a labor dispute case. The case elements of the labor dispute case, namely the target case elements, are: whether the employer recognizes the labor relationship between the two parties, whether to pay labor remuneration, the labor remuneration payment cycle, the labor remuneration payment amount, and whether to submit a wage payment voucher. The above steps are explained below based on this example.

[0134] First, according to the target cause of action of case A, namely, the cause of labor dispute, the preset extraction model corresponding to the cause of labor dispute is selected from all preset extraction models, that is, the target extraction model is obtained.

[0135] Then, the factual text in the judgment document of case A is input into the feature extraction layer in the target extraction model. Through the word embedding layer, sentence embedding layer and position embedding layer of the feature extraction layer, the word vector, sentence vector and position vector of the same dimension are obtained. The word vector, sentence vector and position vector are superimposed to obtain the first vector It represents the semantic features of the factual text of case A.

[0136] Then, the fully connected layer of the target extraction model includes a feature space, which is composed of all case elements of the labor dispute case, namely, the five target case elements. Map to the feature space to obtain the second vector

[0137] Second vector The dimension of is the same as the total number of all target case elements, that is, the second vector The dimension is 5. Each element in the second vector, i.e., f1 to f5, represents the first matching value of the semantic features of the target case elements, i.e., whether the employer recognizes the labor relationship between the two parties, whether the labor remuneration is paid, the labor remuneration payment cycle, the labor remuneration payment amount, and whether the wage payment voucher is submitted, with the factual text of case A.

[0138] Then, each first matching value, i.e., f1 to f5, is normalized through the activation function layer in the target extraction model to obtain the first matching probability, i.e., s1 to s5, of each target case element and the semantic feature; and each first matching probability, i.e., s1 to s5, is compared with a preset threshold. If the first matching probabilities s3, s4 and s5 are less than the preset threshold, the first prediction values, i.e., y3, y4 and y5, respectively, are set to a first value, such as 0; if the first matching probabilities s1 and s2 are greater than the preset threshold, the first prediction values, i.e., y1 and y2, respectively, are set to a second value, such as 1, to obtain each first prediction value, i.e., y1 to y5.

[0139] Obtaining each first prediction value determines the first matching relationship between each target case element and the semantic feature. The first prediction value, i.e., y3, y4, and y5, is 0, which indicates that the target case elements, i.e., the labor remuneration payment cycle, the labor remuneration payment amount, and whether the wage payment voucher is submitted, do not match the first matching relationship with the semantic feature; the first prediction value, i.e., y1 and y2, is 1, which indicates that the target case elements, i.e., whether the employer recognizes the labor relationship between the two parties and whether the labor remuneration is paid, match the first matching relationship with the semantic feature.

[0140] The target case element relationship includes the parameters of each target case element. The target case elements are whether the employer recognizes the labor relationship between the two parties, whether to pay labor remuneration, the labor remuneration payment cycle, the labor remuneration payment amount and whether to submit wage payment vouchers. The parameters are k1, k2, k3, k4 and k5 respectively.

[0141] Then, through the element relationship layer in the target extraction model, the product of the parameters of each target case element and its corresponding first prediction value is calculated, that is, the product of the parameter k1 and the first prediction value y1, i.e. 1, is k1, the product of the parameter k2 and the first prediction value y2, i.e. 1, is k2, the product of the parameter k3 and the first prediction value y3, i.e. 0, is 0, the product of the parameter k4 and the first prediction value y4, i.e. 0, is 0, and the product of the parameter k5 and the first prediction value y5, i.e. 0, is 0.

[0142] For the target case element, whether the employer recognizes the labor relationship between the two parties, the first matching value f1 corresponding to it is added to the product of all target case elements, i.e., k1 and k2, to obtain its second matching value with the semantic feature, i.e., p1. In a similar manner, the target case elements, i.e., whether labor remuneration is paid, the labor remuneration payment cycle, the labor remuneration payment amount, and whether the wage payment voucher is submitted, are obtained respectively, and the second matching values ​​with the semantic feature, i.e., p2, p3, p4, and p5.

[0143] Then, each second matching value, i.e., p1 to p5, is normalized through the element relationship layer in the target extraction model to obtain the second matching probability, i.e., r1 to r5, of each target case element and the semantic feature; and the second matching probability, i.e., r1 to r5, is compared with the preset threshold. If the second matching probability s5 is less than the preset threshold, the corresponding second prediction value, i.e., z5, is set to the first value, such as 0; if the second matching probability s1, s2, s3 and s4 is greater than the preset threshold, the corresponding second prediction values, i.e., z1, z2, z3 and z4, are set to the second value, such as 1, to obtain each second prediction value, i.e., z1 to z5.

[0144] Obtaining each second prediction value determines the second matching relationship between each target case element and the semantic feature. The first prediction value, z5, is 0, which indicates that the target case element, i.e., whether to submit a wage payment voucher, does not match the first matching relationship with the semantic feature; the second prediction values, i.e., z1, z2, z3, and z4, are 1, which indicates that the target case element, i.e., whether the employer recognizes the labor relationship between the two parties, whether to pay labor remuneration, the labor remuneration payment period, and the labor remuneration payment amount, matches the second matching relationship with the semantic feature.

[0145] Finally, according to the second matching relationship between each target case element and the semantic feature, the target case elements that match the second matching relationship of the semantic feature, namely, whether the employer recognizes the labor relationship between the two parties, whether labor remuneration is paid, the labor remuneration payment cycle and the labor remuneration payment amount, are taken as the case elements of Case A, thus obtaining the case elements of Case A.

[0146] Optionally, the embodiment of the present invention also provides a possible implementation method for obtaining a preset extraction model, see Figure 5 , which includes the following steps:

[0147] Before introducing the specific steps, it should be noted that the method for obtaining each preset extraction model is similar, and the following steps are described by taking obtaining a preset extraction model as an example.

[0148] Step S212, constructing multiple case elements of the case based on the legal norms and multiple historical cases of the case;

[0149] In this embodiment, relevant legal norms can be determined based on the case cause, and case materials such as judgment documents of multiple historical cases belonging to the case cause can be obtained from the case library. Based on the relevant legal norms and case materials of multiple historical cases of the case cause, multiple case elements of the case cause can be constructed. These multiple case elements are used to represent all the characteristics of the case cause, which can be understood as the case belonging to the case cause may involve all elements.

[0150] Optionally, in order to ensure the accuracy and comprehensiveness of the case elements of the constructed case cause, legal experts may be consulted to construct multiple case elements of the case cause based on legal norms and multiple historical cases of the case cause.

[0151] Step S214, based on the multiple case elements of the case, label each case sample of the case to obtain each case sample with an element label;

[0152] In this embodiment, multiple case samples belonging to the case cause can be selected from the case library based on multiple angles such as the year of judgment and the court of judgment, and case materials such as judgment documents of each case sample can be obtained; based on multiple case elements of the case cause, the factual text in the judgment document of each case sample is annotated, such as annotating the relevant sentences in the factual text with their corresponding case elements, to obtain each case sample with an element label.

[0153] Step S216, training the basic model based on all case samples with element labels of the case cause to obtain a preset extraction model corresponding to the case cause;

[0154] In this embodiment, all the case samples with element labels can be divided into a training sample set, a verification sample set, and a test sample set according to a preset ratio, such as 8:1:1. The training sample set can be used to perform preliminary training on the basic model, and then the verification sample set and the test sample set can be used to verify and test the basic model after preliminary training to optimize the model and obtain a preset extraction model corresponding to the case.

[0155] It can be seen that based on legal norms and multiple historical cases of the case cause, multiple case elements of the case cause are constructed; and based on these multiple case elements, each case sample of the case cause is labeled to obtain each case sample with an element label; the basic model is trained according to all case samples with element labels of the case cause to obtain the preset extraction model corresponding to the case cause. Based on the multiple case elements and case samples of the case cause, the corresponding preset extraction model is obtained, which can be used to extract the case elements of the case belonging to the case cause, thereby improving the accuracy of extracting case elements.

[0156] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a case element extraction device is given below. Figure 6 , Figure 6 A functional module diagram of a case element extraction device 300 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the case element extraction device 300 provided in this embodiment are the same as those in the above embodiment. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above embodiment.

[0157] The case element extraction device 300 includes:

[0158] A selection module 310 is used to select a target extraction model corresponding to the target case from all preset extraction models according to the target case to which the case to be processed belongs;

[0159] A feature extraction module 330 is used to extract features from the factual text of the case to be processed through a target extraction model to obtain semantic features of the factual text;

[0160] The element extraction module 350 is used to extract case elements that match the semantic features through the target extraction model to obtain case elements of the case to be processed.

[0161] Optionally, the feature extraction module 330 is further used to extract features from the factual text through a feature extraction layer in the target extraction model to obtain a word vector, a sentence vector and a position vector with the same dimension;

[0162] Among them, the word vector represents the word in the fact text, the sentence vector represents the sentence in the fact text, and the position vector represents the position of the word in the fact text;

[0163] Through the feature extraction layer in the target extraction model, the word vector, sentence vector and position vector are superimposed to obtain the first vector representing the semantic features of the factual text.

[0164] Optionally, the element extraction module 350 is further used to determine a first matching value between each target case element and the semantic feature through a target extraction model;

[0165] Through the target extraction model, each first prediction value is obtained based on each first matching value; each first prediction value represents the first matching relationship between each target case element and the semantic feature;

[0166] Through the target extraction model, each second prediction value is obtained based on each first matching value, each first prediction value and the target element relationship; each second prediction value represents the second matching relationship between each target case element and the semantic feature;

[0167] According to the second matching relationship between each target case element and the semantic feature, the case element of the case to be processed is obtained.

[0168] Optionally, the element extraction module 350 is further used to map the first vector to the feature space through a fully connected layer in the target extraction model to obtain a second vector having the same dimension as the total number of all target case elements;

[0169] Each element in the second vector represents the first matching value between each target case element and the semantic feature.

[0170] Optionally, the element extraction module 350 is further used to normalize each first matching value through an activation function layer in the target extraction model to obtain a first matching probability between each target case element and the semantic feature;

[0171] By using the activation function layer in the target extraction model, the first prediction value corresponding to the first matching probability less than the preset threshold is set to the first value, and the first prediction value corresponding to the first matching probability greater than or equal to the preset threshold is set to the second value, to obtain each first prediction value;

[0172] Among them, the first prediction value is the first numerical value, indicating that the first matching relationship between the corresponding target case element and the semantic feature is mismatched; the first prediction value is the second numerical value, indicating that the first matching relationship between the corresponding target case element and the semantic feature is matched.

[0173] Optionally, the element extraction module 350 is further used to calculate the product of the parameter of each target case element and its corresponding first prediction value through the element relationship layer in the target extraction model, and add the first matching value corresponding to each target case element to the product corresponding to all target case elements to obtain the second matching value of each target case element and the semantic feature;

[0174] Through the element relationship layer in the target extraction model, each second matching value is normalized to obtain the second matching probability of each target case element and the semantic feature;

[0175] By using the element relationship layer in the target extraction model, the second prediction value corresponding to the second matching probability less than the preset threshold is set as the first value, and the second prediction value corresponding to the second matching probability greater than or equal to the preset threshold is set as the second value, to obtain each second prediction value;

[0176] Among them, the second prediction value being the first value indicates that the second matching relationship between the corresponding target case element and the semantic feature is mismatched; the second prediction value being the first value indicates that the second matching relationship between the corresponding target case element and the semantic feature is matched.

[0177] Optionally, the case element extraction device 300 also includes a training module 370, which is used to construct multiple case elements of the case based on legal norms and multiple historical cases of the case; based on the multiple case elements of the case, each case sample of the case is labeled to obtain each case sample with an element label; the basic model is trained according to all case samples with element labels of the case to obtain a preset extraction model corresponding to the case.

[0178] An embodiment of the present invention further provides an electronic device, including a processor 120 and a memory 130, wherein the memory 130 stores a computer program, and when the processor executes the computer program, the case element extraction method disclosed in the above embodiment is implemented.

[0179] The embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by the processor 120, the case element extraction method disclosed in the embodiment of the present invention is implemented.

[0180] In summary, the case element extraction method, device, electronic device and storage medium provided by the embodiments of the present invention. By pre-storing multiple case causes and preset extraction models corresponding to each case cause in the electronic device, according to the target case cause to which the case to be processed belongs, a target extraction model corresponding to the target case cause is selected from all preset extraction models; then, through the target extraction model, feature extraction is performed on the factual text of the case to be processed to obtain the semantic features of the factual text; and then, through the target extraction model, case elements matching the semantic features are extracted to obtain the case elements of the case to be processed. Compared with the prior art that directly obtains the text of the set pattern from the case material text, the embodiments of the present invention obtain the semantic features of the factual text and extract the case elements matching it, thereby avoiding the interference of language expression based on the semantic information of the case facts and improving the accuracy of extracting case elements.

[0181] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0182] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0183] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0184] 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.

Claims

1. A case element extraction method, characterized in that: Applied to an electronic device, the electronic device pre-stores a plurality of case causes and a preset extraction model corresponding to each of the case causes, the method comprising: According to the target case to which the case to be processed belongs, a target extraction model corresponding to the target case is selected from all preset extraction models; By using the target extraction model, feature extraction is performed on the factual text of the case to be processed to obtain semantic features of the factual text; Extracting case elements matching the semantic features through the target extraction model to obtain case elements of the case to be processed; Each case cause has multiple case elements; the target extraction model includes a target element relationship, and the target element relationship represents the relationship between all target case elements in the target case cause; The step of extracting case elements matching the semantic features through the target extraction model to obtain the case elements of the case to be processed includes: Determining a first matching value between each of the target case elements and the semantic feature through the target extraction model; By using the target extraction model, based on each of the first matching values, each first prediction value is obtained; each of the first prediction values ​​represents a first matching relationship between each of the target case elements and the semantic feature; By using the target extraction model, each second prediction value is obtained based on each first matching value, each first prediction value and the target element relationship; each second prediction value represents a second matching relationship between each target case element and the semantic feature; According to the second matching relationship between each of the target case elements and the semantic feature, the case elements of the case to be processed are obtained.

2. The method according to claim 1, characterized in that: The target extraction model includes a feature extraction layer; The step of extracting features from the factual text of the case to be processed by the target extraction model to obtain semantic features of the factual text includes: Performing feature extraction on the factual text through the feature extraction layer in the target extraction model to obtain a word vector, a sentence vector and a position vector with the same dimensions; The word vector represents a word in the factual text, the sentence vector represents a sentence in the factual text, and the position vector represents the position of a word in the factual text; The word vector, the sentence vector and the position vector are superimposed through the feature extraction layer in the target extraction model to obtain a first vector representing the semantic features of the factual text.

3. The method according to claim 1, characterized in that The first vector represents the semantic feature; the target extraction model includes a fully connected layer, and the fully connected layer in the target extraction model includes a feature space composed of all target case elements; The step of determining the first matching value between each of the target case elements and the semantic feature through the target extraction model comprises: Mapping the first vector to the feature space through a fully connected layer in the target extraction model to obtain a second vector having the same dimension as the total number of all target case elements; Each element in the second vector represents a first matching value between each of the target case elements and the semantic feature.

4. The method according to claim 1, characterized in that The target extraction model includes an activation function layer; The step of obtaining each first prediction value based on each first matching value by using the target extraction model comprises: Normalizing each of the first matching values ​​through an activation function layer in the target extraction model to obtain a first matching probability between each of the target case elements and the semantic feature; By means of the activation function layer in the target extraction model, the first prediction value corresponding to the first matching probability less than a preset threshold is set to a first value, and the first prediction value corresponding to the first matching probability greater than or equal to the preset threshold is set to a second value, to obtain each of the first prediction values; Among them, the first prediction value is that the first numerical value indicates that the first matching relationship between the corresponding target case element and the semantic feature is mismatched; the first prediction value is that the second numerical value indicates that the first matching relationship between the corresponding target case element and the semantic feature is matched.

5. The method according to claim 1, characterized in that The target element relationship includes parameters of each target case element, and the target extraction model includes an element relationship layer; The step of obtaining each second prediction value based on each first matching value, each first prediction value and the target element relationship through the target extraction model comprises: The product of the parameter of each target case element and its corresponding first prediction value is calculated through the element relationship layer in the target extraction model, and the first matching value corresponding to each target case element is added to the product corresponding to all target case elements to obtain the second matching value of each target case element and the semantic feature; Normalizing each of the second matching values ​​through the element relationship layer in the target extraction model to obtain a second matching probability between each of the target case elements and the semantic feature; By means of the element relationship layer in the target extraction model, the second prediction value corresponding to the second matching probability less than the preset threshold is set as the first value, and the second prediction value corresponding to the second matching probability greater than or equal to the preset threshold is set as the second value, to obtain each of the second prediction values; Among them, the second prediction value is the first value indicating that the second matching relationship between the corresponding target case element and the semantic feature is mismatched; the second prediction value is the first value indicating that the second matching relationship between the corresponding target case element and the semantic feature is matched.

6. The method according to claim 1, characterized in that Any one of the preset extraction models is obtained in the following manner: Based on legal norms and multiple historical cases of the case, construct multiple case elements of the case; Based on the multiple case elements of the case cause, each case sample of the case cause is labeled to obtain each case sample with an element label; The basic model is trained according to all case samples with element labels of the case cause to obtain a preset extraction model corresponding to the case cause.

7. A case element extraction device, characterized in that: Applied to an electronic device, the electronic device pre-stores a plurality of case causes and a preset extraction model corresponding to each of the case causes, the device comprises: A selection module, used to select a target extraction model corresponding to the target case from all preset extraction models according to the target case to which the case to be processed belongs; A feature extraction module, used to extract features of the factual text of the case to be processed through the target extraction model to obtain semantic features of the factual text; An element extraction module, used to extract case elements matching the semantic features through the target extraction model to obtain case elements of the case to be processed; Each case cause has multiple case elements; the target extraction model includes a target element relationship, which represents the relationship between all target case elements in the target case cause; the element extraction module is also used to: determine the first matching value between each target case element and the semantic feature through the target extraction model; obtain each first prediction value based on each first matching value through the target extraction model; each first prediction value represents the first matching relationship between each target case element and the semantic feature; obtain each second prediction value based on each first matching value, each first prediction value and the target element relationship through the target extraction model; each second prediction value represents the second matching relationship between each target case element and the semantic feature; obtain the case elements of the case to be processed according to the second matching relationship between each target case element and the semantic feature.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.