Applicable rule analysis method, device, electronic device and storage medium

By performing word segmentation, data augmentation and encoding conversion on the fact description set and the rule description set, the classification model is trained for rule analysis, which solves the problem of low accuracy of applicable rules in the prior art, and improves the analysis accuracy and coding efficiency.

CN112347739BActive Publication Date: 2025-02-18PINGAN ZHITONG CONSULT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011221079.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-05
Publication Date
2025-02-18
Estimated Expiration
2040-11-05

AI Technical Summary

Technical Problem

The accuracy of applicable rules analysis in the prior art is low, especially in the judicial field. When analyzing data with strong rules, the accuracy of the model is poorly classified due to the cross-label of the dispute focus and the similarity of case documents. The impact of the problem.

Method used

By obtaining the fact description set and the rule description set, word segmentation and data enhancement processing are performed to form a standard fact description set and keyword set, and after encoding conversion, it forms a coding set, which is used to train the classification model and then conduct rule analysis.

Benefits of technology

The overall analysis accuracy of the model is improved, the coding conversion efficiency is improved through different coding methods, and the accuracy of the model for rule analysis is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112347739B_ABST
    Figure CN112347739B_ABST
Patent Text Reader

Abstract

The present invention relates to artificial intelligence technology, and discloses an applicable rule analysis method, including: obtaining a fact description set and a corresponding rule description set, performing word segmentation and data enhancement processing on the fact description set to obtain a standard fact description set, performing word segmentation processing on the rule description set to obtain a keyword set, obtaining a keyword label according to the keyword set, respectively performing encoding conversion on the standard fact description set and the keyword label to obtain a fact encoding set and a keyword encoding set, and performing rule analysis on the fact description set to be detected using an analysis model trained with the fact encoding set and the keyword encoding set to obtain a final rule analysis result. In addition, the present invention also relates to blockchain technology, and the final rule analysis result can be stored in a node of a blockchain. The present invention also proposes an applicable rule analysis device, an electronic device, and a computer-readable storage medium. The present invention can solve the problem of low accuracy in applicable rule analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an applicable rule analysis method, device, electronic device and computer-readable storage medium. Background Art

[0002] In the context of big data, the scale of data has expanded dramatically, and data analysis and prediction are widely used in different fields. Among them, it is difficult to analyze the applicable rules for data with strong definitions or rule descriptions. For example, in the judicial field, judges / lawyers / parties will judge and find the laws and regulations involved in a paragraph of factual description based on a paragraph of factual description. Under the existing technology, there are mainly the following methods for analyzing the applicable rules for such data with strong regularity: 1. Based on legal reasoning, obtain the legal provisions involved in the factual statement, first use the model to determine the focus of the dispute involved in a paragraph of factual description text, and then infer that the focus of the dispute points to the laws and regulations involved, but this method may have cross-labels between the focus of the dispute, so it may affect the accuracy of the model. 2. Use multiple binary classification methods to learn the relationship between factual descriptions and regulations, but in case documents, many case descriptions have high similarity, but the regulations involved are different, and the classification model has a poor effect on this classification. Summary of the invention

[0003] The present invention provides an applicable rule analysis method, device and computer-readable storage medium, the main purpose of which is to solve the problem of low accuracy in applicable rule analysis.

[0004] To achieve the above object, the present invention provides an applicable rule analysis method, comprising:

[0005] Obtain a fact description set and a corresponding rule description set;

[0006] Performing word segmentation and data enhancement processing on the fact description set to obtain a standard fact description set, performing word segmentation processing on the rule description set to obtain a keyword set, and obtaining keyword tags according to the standard fact description set and the keyword set;

[0007] Performing encoding conversion on the standard fact description set and the keyword tag respectively to obtain a fact encoding set and a keyword encoding set, and summarizing the fact encoding set and the keyword encoding set to obtain an encoding set;

[0008] The pre-built classification model is trained by the coding set to obtain an analysis model;

[0009] The analysis model is used to perform rule analysis on the description set of facts to be detected to obtain a final rule analysis result.

[0010] Optionally, performing word segmentation and data enhancement processing on the fact description set to obtain a standard fact description set includes:

[0011] Using a preset word segmentation algorithm to perform word segmentation and filtering processing on the fact description text in the fact description set to obtain a word segmentation result set;

[0012] Performing feature selection on the words in the word segmentation result set to obtain a feature result set;

[0013] Re-sampling a preset proportion of words in the feature result set, and again segmenting and filtering the re-sampled fact description text to obtain an enhanced feature result set;

[0014] The enhanced feature result set and the words in the feature result set that have not been resampled are aggregated to obtain the standard fact description set.

[0015] Optionally, the word segmentation and filtering processing is performed on the fact description text in the fact description set by using a preset word segmentation algorithm to obtain a word segmentation result set, including:

[0016] Acquire a preset proprietary vocabulary, and segment the fact description text in the fact description set based on the proprietary vocabulary to obtain an initial segmentation result;

[0017] Stop words in the initial word segmentation results are removed, and characters of a preset length are filtered out to obtain the word segmentation result set.

[0018] Optionally, performing word segmentation processing on the rule description set to obtain a keyword set, and obtaining a keyword tag according to the standard fact description set and the keyword set, includes:

[0019] Using the preset word segmentation algorithm to perform word segmentation and filtering processing on the rule description text in the rule description set to obtain a keyword set;

[0020] The standard fact description set is analyzed using a pre-built multi-label model, and keyword labels corresponding to the fact description text are analyzed from the keyword set.

[0021] Optionally, the encoding conversion of the standard fact description set and the keyword tag to obtain a fact encoding set and a keyword encoding set includes:

[0022] Using a preset first encoding method to encode the standard fact description set to obtain the fact encoding set;

[0023] The keyword tag is encoded using a preset second encoding method to obtain the keyword encoding set.

[0024] Optionally, encoding the keyword tag using a preset second encoding method to obtain the keyword encoding set includes:

[0025] Obtain a pre-built keyword library, calculate the similarity between the text in the keyword tag and the words in the keyword library, and use the similarity as the weight of the keyword when encoding the keyword;

[0026] Based on the weight, the text in the keyword tag is encoded using the second encoding method to obtain the keyword encoding set.

[0027] Optionally, using the analysis model to perform rule analysis on the to-be-detected fact description set to obtain a final rule analysis result includes:

[0028] Analyzing the to-be-detected fact description set using the analysis model to obtain a prediction candidate set;

[0029] The prediction candidate set is filtered by a preset filtering rule to obtain the final rule analysis result.

[0030] In order to solve the above problem, the present invention further provides an applicable rule analysis device, the device comprising:

[0031] A text acquisition module is used to obtain a fact description set and a corresponding rule description set;

[0032] A text processing module, configured to perform word segmentation and data enhancement processing on the fact description set to obtain a standard fact description set, perform word segmentation processing on the rule description set to obtain a keyword set, and obtain keyword tags based on the standard fact description set and the keyword set;

[0033] A coding conversion module, used for performing coding conversion on the standard fact description set and the keyword tag respectively to obtain a fact coding set and a keyword coding set, and summarizing the fact coding set and the keyword coding set to obtain a coding set;

[0034] A model training module, used to train the pre-built classification model through the coding set to obtain an analysis model;

[0035] The rule analysis module is used to use the analysis model to perform rule analysis on the description set of facts to be detected to obtain the final rule analysis result.

[0036] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0037] a memory storing at least one instruction; and

[0038] The processor executes the instructions stored in the memory to implement the above-mentioned applicable rule analysis method.

[0039] In order to solve the above problem, the present invention further provides a computer-readable storage medium, wherein at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned applicable rule analysis method.

[0040] The present invention forms a keyword set by performing data processing on the rule description set, and tags the corresponding fact description with keywords according to the keyword set, which can improve the overall analysis accuracy of the model, and uses different encoding methods to encode the standard fact description set and the keyword tags, with high encoding conversion efficiency. At the same time, the pre-constructed classification model is trained by the encoding set to obtain an analysis model, which can improve the accuracy of model analysis. Therefore, the applicable rule analysis method, device, electronic device and computer-readable storage medium proposed by the present invention can solve the problem of low accuracy of applicable rule analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of a flow chart of an applicable rule analysis method provided by an embodiment of the present invention;

[0042] Figure 2 for Figure 1 A detailed implementation flow chart of one of the steps in the process;

[0043] Figure 3 for Figure 1 A detailed implementation flow diagram of another step in FIG.

[0044] Figure 4 for Figure 1 A detailed implementation flow diagram of another step in FIG.

[0045] Figure 5 for Figure 1 A detailed implementation flow diagram of another step in FIG.

[0046] Figure 6 A functional module diagram of an applicable rule analysis device provided by an embodiment of the present invention;

[0047] Figure 7 A schematic diagram of the structure of an electronic device for implementing the applicable rule analysis method provided by an embodiment of the present invention.

[0048] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0050] The embodiment of the present application provides an applicable rule analysis method. The execution subject of the applicable rule analysis method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the applicable rule analysis method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0051] Reference Figure 1 FIG. 1 is a flow chart of an applicable rule analysis method provided by an embodiment of the present invention. In this embodiment, the applicable rule analysis method includes:

[0052] S1. Obtain a fact description set and a corresponding rule description set.

[0053] In an embodiment of the present invention, the fact description set includes fact description texts of various things in different fields; and the rule description set includes rule description texts of definitions and concepts of the various things. For example, in the judicial field, the fact description text in the fact description set can be a case description text, and the corresponding rule description can be a legal provision description text.

[0054] The present invention is implemented by acquiring a fact description set and a corresponding rule description set to form an original data set for model training.

[0055] S2. Perform word segmentation and data enhancement processing on the fact description set to obtain a standard fact description set, and perform word segmentation processing on the rule description set to obtain a keyword set, and obtain keyword tags based on the standard fact description set and the keyword set.

[0056] refer to Figure 2 As shown, the fact description set is segmented and data enhanced to obtain a standard fact description set, including:

[0057] S20, using a preset word segmentation algorithm to perform word segmentation and filtering processing on the fact description text in the fact description set to obtain a word segmentation result set;

[0058] S21, performing feature selection on the words in the word segmentation result set to obtain a feature result set;

[0059] S22, re-sampling a preset proportion of words in the feature result set, and again segmenting and filtering the re-sampled fact description text to obtain an enhanced feature result set;

[0060] S23, summarizing the enhanced feature result set and the words in the feature result set that have not been resampled to obtain the standard fact description set.

[0061] In one embodiment of the present invention, the word segmentation and filtering process is performed on the fact description text in the fact description set by using a preset word segmentation algorithm to obtain a word segmentation result set, including:

[0062] Acquire a preset proprietary vocabulary, and segment the fact description text in the fact description set based on the proprietary vocabulary to obtain an initial segmentation result;

[0063] Stop words in the initial word segmentation results are removed, and characters of a preset length are filtered out to obtain the word segmentation result set.

[0064] The specialized vocabulary list may be a vocabulary list containing specialized legal vocabulary compiled by legal experts.

[0065] The stop words may include auxiliary words, prepositions, quantifiers, etc., and the preset length may be 1 character.

[0066] Furthermore, the feature selection refers to calculating the importance of each word in the word segmentation result set obtained after filtering, and selecting a preset number of words according to the importance. In an embodiment of the present invention, the tf-idf algorithm can be used to calculate the importance. The data enhancement refers to selecting a preset proportion of words in the order of importance from large to small when there are few words with an importance greater than a preset threshold in the calculation result of the importance, resampling the fact description text corresponding to the words, and segmenting and filtering the fact description text. In an embodiment of the present invention, the resampling ratio does not exceed ten times the original fact description text.

[0067] Furthermore, the word segmentation processing is performed on the rule description set to obtain a keyword set, and the keyword tags are obtained according to the standard fact description set and the keyword set, including:

[0068] Using the preset word segmentation algorithm to perform word segmentation and filtering processing on the rule description text in the rule description set to obtain a keyword set;

[0069] The standard fact description set is analyzed using a pre-built multi-label model, and keyword labels corresponding to the fact description text are analyzed from the keyword set.

[0070] The pre-built multi-classification model may be an SVM multi-label model. The kernel function of the SVM multi-label model may adopt a radial basis function. In the embodiment of the present invention, the keyword label corresponding to the fact description can be analyzed from the keyword set using the trained SVM multi-label model.

[0071] In the embodiment of the present invention, the overall analysis accuracy of the model can be improved by performing word segmentation processing on the rule description set to form a keyword set, and tagging the corresponding fact description with a keyword tag according to the keyword set.

[0072] S3. Perform encoding conversion on the standard fact description set and the keyword tag respectively to obtain a fact encoding set and a keyword encoding set, and summarize the fact encoding set and the keyword encoding set to obtain an encoding set.

[0073] In one embodiment of the present invention, reference Figure 3 As shown, the standard fact description set and the keyword tag are respectively converted into codes to obtain a fact coding set and a keyword coding set, including:

[0074] S30, encoding the standard fact description set using a preset first encoding method to obtain the fact encoding set;

[0075] S31. Encode the keyword tag using a preset second encoding method to obtain the keyword encoding set.

[0076] The first encoding method may be a tf-idf method of a statistical model and a bert_tokenizer encoding.

[0077] In detail, the encoding process of the keyword tag using the preset second encoding method to obtain the keyword encoding set includes:

[0078] Obtain a pre-built keyword library, calculate the similarity between the text in the keyword tag and the words in the keyword library, and use the similarity as the weight of the keyword when encoding the keyword;

[0079] Based on the weight, the text in the keyword tag is encoded using the second encoding method to obtain the keyword encoding set.

[0080] The second encoding method may be word2vec encoding with an attention mechanism. The preset keyword library may extract keywords from the description of the legal provisions to form a keyword library about the legal provisions. In the embodiment of the present invention, the attention mechanism is used to calculate the similarity between the keyword label text and the words in the keyword library as the weight of the keyword when encoding the keyword.

[0081] The embodiment of the present invention utilizes different encoding methods to encode the standard fact description set and the keyword tags, and the encoding conversion efficiency is relatively high.

[0082] S4. The pre-constructed classification model is trained by using the coding set to obtain an analysis model.

[0083] In an embodiment of the present invention, the pre-constructed classification model can adopt a fusion of three classification models: a fine-tuned BERT model for a single sentence classification task based on BERT, a TextCNN model, and a residual CNN model. At the same time, the output layers of the three models are spliced ​​and connected to the sigmiod function through a fully connected layer for category output, and the analysis result is output through the sigmiod function.

[0084] refer to Figure 4 As shown, in one embodiment of the present invention, the pre-constructed classification model is trained by the encoding set to obtain the analysis model, including:

[0085] S40, using the pre-built classification model to analyze and calculate the coding set to obtain an analysis result;

[0086] S41, calculating the similarity between the analysis result and the label corresponding to the fact description;

[0087] S42, determining whether the similarity is less than a preset threshold value, and when the similarity is less than the preset threshold value, adjusting the parameters of the pre-built classification model, and returning to the above S40;

[0088] When the accuracy is greater than or equal to the preset threshold, S43 is executed to use the corresponding classification model as the analysis model.

[0089] In the embodiment of the present invention, the analysis model includes multiple classification models, which can improve the accuracy of model analysis.

[0090] S5. Use the analysis model to perform rule analysis on the to-be-detected fact description set to obtain a final rule analysis result.

[0091] See also Figure 5 As shown, in one embodiment of the present invention, the S5 includes:

[0092] S50, analyzing the to-be-detected fact description set using the analysis model to obtain a prediction candidate set;

[0093] S51 . Filter the prediction candidate set according to preset filtering rules to obtain the final rule analysis result.

[0094] In the embodiment of the present invention, the prediction candidate set may include rules pre-defined by a user according to practice, so as to correct the prediction candidate set obtained by the analysis model.

[0095] For example, when the analysis model described in the embodiment of the present invention is used to analyze the description of the facts to be detected, the prediction candidate set obtained may be "theft" or "robbery". The embodiment of the present invention uses a preset filtering rule (for example, "theft" must contain the word "steal") to filter out the crime "robbery" described in the last fact. The embodiment of the present invention further filters and selects the prediction candidate set through the preset filtering rules, thereby further improving the accuracy of the model analysis.

[0096] The present invention forms a keyword set by performing data processing on the rule description set, and tags the corresponding fact description with a keyword according to the keyword set, thereby improving the overall analysis accuracy of the model, and uses different encoding methods to encode the standard fact description set and the keyword tag, with high encoding conversion efficiency, and trains the pre-built classification model through the encoding set to obtain an analysis model, thereby improving the accuracy of model analysis. Therefore, the embodiment of the present invention can solve the problem of low accuracy of applicable rule analysis.

[0097] like Figure 6 , which is a functional module diagram of an applicable rule analysis device provided by an embodiment of the present invention.

[0098] The applicable rule analysis device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the applicable rule analysis device 100 can include a text acquisition module 101, a text processing module 102, a coding conversion module 103, a model training module 104 and a rule analysis module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0099] In this embodiment, the functions of each module / unit are as follows:

[0100] The text acquisition module 101 is used to acquire a fact description set and a corresponding rule description set.

[0101] In an embodiment of the present invention, the fact description set includes fact description texts for various things in different fields; and the rule description set includes rule description texts for definitions and concepts of the various things. For example, in the judicial field, the fact description text in the fact description set can be a case description text, and the corresponding rule description can be a legal provision description text.

[0102] The present invention is implemented by acquiring a fact description set and a corresponding rule description set to form an original data set for model training.

[0103] The text processing module 102 is used to perform word segmentation and data enhancement processing on the fact description set to obtain a standard fact description set, and to perform word segmentation processing on the rule description set to obtain a keyword set, and to obtain keyword tags based on the standard fact description set and the keyword set.

[0104] Preferably, the text processing module 102 obtains the standard fact description set by the following operations:

[0105] Using a preset word segmentation algorithm to perform word segmentation and filtering processing on the fact description text in the fact description set to obtain a word segmentation result set;

[0106] Performing feature selection on the words in the word segmentation result set to obtain a feature result set;

[0107] Re-sampling a preset proportion of words in the feature result set, and again segmenting and filtering the re-sampled fact description text to obtain an enhanced feature result set;

[0108] The enhanced feature result set and the words in the feature result set that have not been resampled are aggregated to obtain the standard fact description set.

[0109] In one embodiment of the present invention, the text processing module 102 obtains the word segmentation result set by the following operations:

[0110] Acquire a preset proprietary vocabulary, and segment the fact description text in the fact description set based on the proprietary vocabulary to obtain an initial segmentation result;

[0111] Stop words in the initial word segmentation results are removed, and characters of a preset length are filtered out to obtain the word segmentation result set.

[0112] The specialized vocabulary list may be a vocabulary list containing specialized legal vocabulary compiled by legal experts.

[0113] The stop words may include auxiliary words, prepositions, quantifiers, etc., and the preset length may be 1 character.

[0114] Furthermore, the feature selection refers to calculating the importance of each word in the word segmentation result set obtained after filtering, and selecting a preset number of words according to the importance. In an embodiment of the present invention, the tf-idf algorithm can be used to calculate the importance. The data enhancement refers to selecting a preset proportion of words in the order of importance from large to small when there are few words with an importance greater than a preset threshold in the calculation result of the importance, resampling the fact description text corresponding to the words, and segmenting and filtering the fact description text. In an embodiment of the present invention, the resampling ratio does not exceed ten times the original fact description text.

[0115] Furthermore, the text processing module 102 obtains the keyword tag through the following operations:

[0116] Using the preset word segmentation algorithm to perform word segmentation and filtering processing on the rule description text in the rule description set to obtain a keyword set;

[0117] The standard fact description set is analyzed using a pre-built multi-label model, and keyword labels corresponding to the fact description text are analyzed from the keyword set.

[0118] The pre-built multi-classification model may be an SVM multi-label model. The kernel function of the SVM multi-label model may adopt a radial basis function. In the embodiment of the present invention, the keyword label corresponding to the fact description can be analyzed from the keyword set using the trained SVM multi-label model.

[0119] In the embodiment of the present invention, the overall analysis accuracy of the model can be improved by performing word segmentation processing on the rule description set to form a keyword set, and tagging the corresponding fact description with a keyword tag according to the keyword set.

[0120] The encoding conversion module 103 is used to perform encoding conversion on the standard fact description set and the keyword tag respectively to obtain a fact encoding set and a keyword encoding set, and to aggregate the fact encoding set and the keyword encoding set to obtain an encoding set.

[0121] Preferably, the encoding conversion module 103 obtains the fact encoding set and the keyword encoding set by the following operations:

[0122] Using a preset first encoding method to encode the standard fact description set to obtain the fact encoding set;

[0123] The keyword tag is encoded using a preset second encoding method to obtain the keyword encoding set.

[0124] The first encoding method may be a tf-idf method of a statistical model and a bert_tokenizer encoding.

[0125] In detail, the encoding conversion module 103 obtains the keyword encoding set through the following operations:

[0126] Obtain a pre-built keyword library, calculate the similarity between the text in the keyword tag and the words in the keyword library, and use the similarity as the weight of the keyword when encoding the keyword;

[0127] Based on the weight, the text in the keyword tag is encoded using the second encoding method to obtain the keyword encoding set.

[0128] The second encoding method may be word2vec encoding with an attention mechanism. The preset keyword library may extract keywords from the description of the legal provisions to form a keyword library about the legal provisions. In the embodiment of the present invention, the attention mechanism is used to calculate the similarity between the keyword label text and the words in the keyword library as the weight of the keyword when encoding the keyword.

[0129] The embodiment of the present invention utilizes different encoding methods to encode the standard fact description set and the keyword tags, and the encoding conversion efficiency is relatively high.

[0130] The model training module 104 is used to train the pre-constructed classification model through the coding set to obtain an analysis model.

[0131] In an embodiment of the present invention, the pre-constructed classification model can adopt a fusion of three classification models: a fine-tuned BERT model for a single sentence classification task based on BERT, a TextCNN model, and a residual CNN model. At the same time, the output layers of the three models are spliced ​​and connected to the sigmiod function through a fully connected layer for category output, and the analysis result is output through the sigmiod function.

[0132] In one embodiment of the present invention, the model training module 104 includes:

[0133] A first calculation unit, used to analyze and calculate the coding set using the pre-built classification model to obtain an analysis result;

[0134] A second calculation unit, used to calculate the similarity between the analysis result and the label corresponding to the fact description;

[0135] A model adjustment unit, used to determine whether the similarity is less than a preset threshold, and when the similarity is less than the preset threshold, adjust the parameters of the pre-built classification model and return to the first calculation unit;

[0136] The model generation unit is used to use the corresponding classification model as the analysis model when the accuracy is greater than or equal to the preset threshold.

[0137] In the embodiment of the present invention, the analysis model includes multiple classification models, which can improve the accuracy of model analysis.

[0138] The rule analysis module 105 is used to perform rule analysis on the to-be-detected fact description set using the analysis model to obtain a final rule analysis result.

[0139] In one embodiment of the present invention, the rule analysis module 105 obtains the final rule analysis result by the following operations:

[0140] Analyzing the to-be-detected fact description set using the analysis model to obtain a prediction candidate set;

[0141] The prediction candidate set is filtered by a preset filtering rule to obtain the final rule analysis result.

[0142] In the embodiment of the present invention, the prediction candidate set may include rules pre-defined by a user according to practice, so as to correct the prediction candidate set obtained by the analysis model.

[0143] For example, when the analysis model described in the embodiment of the present invention is used to analyze the description of the facts to be detected, the prediction candidate set obtained may be "theft" or "robbery". The embodiment of the present invention uses a preset filtering rule (for example, "theft" must contain the word "steal") to filter out the crime "robbery" described in the last fact. The embodiment of the present invention further filters and selects the prediction candidate set through the preset filtering rules, thereby further improving the accuracy of the model analysis.

[0144] like Figure 7 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing an applicable rule analysis method provided by an embodiment of the present invention.

[0145] The electronic device 1 may include a processor 10 , a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as an applicable rule analysis program 12 .

[0146] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the applicable rule analysis program 12, etc., but may also be used to temporarily store data that has been output or is to be output.

[0147] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as applicable rule analysis programs, etc.) stored in the memory 11, and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0148] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0149] Figure 7 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 7The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0150] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0151] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0152] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0153] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0154] The applicable rule analysis program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0155] Obtain a fact description set and a corresponding rule description set;

[0156] Performing word segmentation and data enhancement processing on the fact description set to obtain a standard fact description set, and performing word segmentation processing on the rule description set to obtain a keyword set, and obtaining keyword tags according to the standard fact description set and the keyword set;

[0157] Performing encoding conversion on the standard fact description set and the keyword tag respectively to obtain a fact encoding set and a keyword encoding set, and summarizing the fact encoding set and the keyword encoding set to obtain an encoding set;

[0158] The pre-built classification model is trained by the coding set to obtain an analysis model;

[0159] The analysis model is used to perform rule analysis on the description set of facts to be detected to obtain a final rule analysis result.

[0160] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 5 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0161] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0162] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0163] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0164] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0165] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0166] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0167] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0168] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.

[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for analyzing applicable rules, characterized in that: The method comprises: Obtain a fact description set and a corresponding rule description set; Performing word segmentation and data enhancement processing on the fact description set to obtain a standard fact description set; performing word segmentation processing on the rule description set to obtain a keyword set; Obtaining keyword tags according to the standard fact description set and the keyword set; Performing encoding conversion on the standard fact description set and the keyword tag respectively to obtain a fact encoding set and a keyword encoding set, and summarizing the fact encoding set and the keyword encoding set to obtain an encoding set; The pre-built classification model is trained by the coding set to obtain an analysis model; Using the analysis model to perform rule analysis on the to-be-detected fact description set, to obtain a final rule analysis result; The word segmentation and data enhancement processing is performed on the fact description set to obtain a standard fact description set, including: Using a preset word segmentation algorithm to perform word segmentation and filtering processing on the fact description text in the fact description set to obtain a word segmentation result set; Performing feature selection on the words in the word segmentation result set to obtain a feature result set; Re-sampling a preset proportion of words in the feature result set, and again segmenting and filtering the re-sampled fact description text to obtain an enhanced feature result set; The enhanced feature result set and the words in the feature result set that have not been resampled are aggregated to obtain the standard fact description set.

2. The applicable rule analysis method according to claim 1, characterized in that: The method of using a preset word segmentation algorithm to perform word segmentation and filtering processing on the fact description text in the fact description set to obtain a word segmentation result set includes: Acquire a preset proprietary vocabulary, and segment the fact description text in the fact description set based on the proprietary vocabulary to obtain an initial segmentation result; Stop words in the initial word segmentation results are removed, and characters of a preset length are filtered out to obtain the word segmentation result set.

3. The applicable rule analysis method according to claim 1, characterized in that: The word segmentation processing is performed on the rule description set to obtain a keyword set, and the keyword tags are obtained according to the standard fact description set and the keyword set, including: Using the preset word segmentation algorithm to perform word segmentation and filtering processing on the rule description text in the rule description set to obtain a keyword set; The standard fact description set is analyzed using a pre-built multi-label model, and keyword labels corresponding to the fact description text are analyzed from the keyword set.

4. The applicable rule analysis method according to claim 1, characterized in that: The encoding conversion of the standard fact description set and the keyword tag is performed respectively to obtain a fact encoding set and a keyword encoding set, including: Using a preset first encoding method to encode the standard fact description set to obtain the fact encoding set; The keyword tag is encoded using a preset second encoding method to obtain the keyword encoding set.

5. The applicable rule analysis method according to claim 4, characterized in that: The method of encoding the keyword tag using a preset second encoding method to obtain the keyword encoding set includes: Obtain a pre-built keyword library, calculate the similarity between the text in the keyword tag and the words in the keyword library, and use the similarity as the weight of the keyword when encoding the keyword; Based on the weight, the text in the keyword tag is encoded using the second encoding method to obtain the keyword encoding set.

6. The applicable rule analysis method according to any one of claims 1 to 5, characterized in that: The use of the analysis model to perform rule analysis on the to-be-detected fact description set to obtain a final rule analysis result includes: Analyzing the to-be-detected fact description set using the analysis model to obtain a prediction candidate set; The prediction candidate set is filtered by a preset filtering rule to obtain the final rule analysis result.

7. An applicability rule analysis device, used to implement the applicability rule analysis method according to any one of claims 1 to 6, characterized in that: The device comprises: A text acquisition module is used to obtain a fact description set and a corresponding rule description set; A text processing module, used for performing word segmentation and data enhancement processing on the fact description set to obtain a standard fact description set, performing word segmentation processing on the rule description set to obtain a keyword set, and obtaining keyword tags according to the standard fact description set and the keyword set; A coding conversion module, used for performing coding conversion on the standard fact description set and the keyword tag respectively to obtain a fact coding set and a keyword coding set, and summarizing the fact coding set and the keyword coding set to obtain a coding set; A model training module, used to train the pre-built classification model through the coding set to obtain an analysis model; The rule analysis module is used to use the analysis model to perform rule analysis on the description set of facts to be detected to obtain the final rule analysis result.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the applicable rule analysis method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the applicable rule analysis method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Deep learning-based larceny auxiliary sentencing method

    CN110610005A

  • Legal provision recommendation method based on joint deep learning model

    CN110750635A