A document processing method, device, electronic device and storage medium
By introducing a physical label system and automatically extracting legal elements in the processing of legal documents, the problem of low efficiency in reading legal documents in the existing technology is solved, and efficient and accurate extraction and structured processing of legal documents are achieved.
Patent Information
- Application Number
- CN202011192246.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-30
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2040-10-30
AI Technical Summary
When reading legal documents, the prior art mainly relies on manual reading and analysis, resulting in large and heavy workload and inefficient.
By introducing the entity label system of target legal documents, legal elements are automatically extracted and structured documents are constructed based on these elements, simplifying the reading and analysis process of legal documents.
It significantly improves the efficiency and accuracy of legal document information extraction, reduces the complexity of manual reading and analysis, and improves user experience.
Smart Images

Figure CN112330501B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, in particular to natural language processing technology, and specifically to a document processing method, device, electronic device and storage medium. Background Art
[0002] At present, the existing technology mainly uses manual reading, analysis and extraction of legal document elements when reading legal documents, which is very labor-intensive and arduous. Summary of the invention
[0003] Embodiments of the present invention provide a document processing method, device, electronic device and storage medium to simplify the complexity of legal document reading operations and thereby improve work efficiency.
[0004] In a first aspect, an embodiment of the present invention provides a document processing method, comprising:
[0005] In response to a user's request for processing a legal document, obtaining an entity tag system of a target legal document;
[0006] Extracting legal elements from the target legal document based on the entity labeling system of the target legal document;
[0007] Based on the entity tag system of the target legal document and according to the extracted legal elements, a structured document of the target legal document is obtained.
[0008] In a second aspect, an embodiment of the present invention provides a document processing device, including:
[0009] An entity tag system acquisition module, used to respond to a user's legal document processing request and acquire an entity tag system of a target legal document;
[0010] A legal element extraction module, used for extracting legal elements from a target legal document based on an entity labeling system of the target legal document;
[0011] The structured document determination module is used to obtain the structured document of the target legal document based on the entity tag system of the target legal document and the extracted legal elements.
[0012] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0013] one or more processors;
[0014] A memory for storing one or more programs;
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the document processing method as described in any embodiment of the present invention.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the document processing method as described in any embodiment of the present invention.
[0017] The technical solution provided by the embodiment of the present invention introduces the entity tag system of the target legal document, and based on the entity tag system of the target legal document, extracts legal elements from the target legal document, and then obtains the structured document of the target legal document based on the extracted legal elements, so that users such as judges can quickly capture important information from the structured document. Compared with the prior art, this embodiment significantly enhances the actual information extraction effect and improves the user experience by automatically constructing the structured document of the legal document, and provides a new idea for quickly reading important information from the legal document. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flow chart of a document processing method provided in Embodiment 1 of the present invention;
[0019] Figure 2 is a flow chart of a document processing method provided in Embodiment 2 of the present invention;
[0020] Figure 3 is a flow chart of a document processing method provided in Embodiment 3 of the present invention;
[0021] Figure 4 is a structural schematic diagram of a document processing device provided in Embodiment 4 of the present invention;
[0022] Figure 5 It is a structural schematic diagram of an electronic device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0023] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0024] Embodiment 1
[0025] Figure 1This is a flowchart of a document processing method provided in the first embodiment of the present invention. This embodiment can be applied to the situation of how to process legal documents so as to quickly extract important information from legal documents. The method can be executed by a document processing device, which can be implemented by software and / or hardware and can be integrated into a computing device that carries a text processing function, such as a server device.
[0026] like Figure 1 The document processing method shown includes:
[0027] S110. In response to the user's request for processing a legal document, an entity tag system of the target legal document is obtained.
[0028] Among them, the legal document is a document composed of a header, defendant information, litigation records, facts and other information in accordance with the legal document specification; the target legal document refers to the legal document that the user needs to extract information from; the legal document processing request can be triggered when the user has a legal document processing demand. For example, this embodiment can provide a visual interactive interface, and then when the user has a legal document processing demand, he can enter the target legal document in the visual interactive interface and click a submit button or control, etc., thereby triggering the generation of a legal document processing request for processing the target legal document.
[0029] The entity labeling system is an abstract format system of legal documents, which can include all elements in legal documents. Optionally, the entity labeling system can exist in the form of Word tables or Excel. For example, the target legal document belongs to the judgment of dangerous driving crime, and the entity labeling system of the target legal document is shown in Table 1.
[0030]
[0031] Table 1 Entity labeling system of target legal documents
[0032] As shown in Table 1, the entity label system of the target legal document may include primary labels, secondary labels, tertiary labels, data types defined by output, examples of extracted values, and legal meanings of label items. Among them, primary labels may include but are not limited to basic information of the document, defendant information, trial information, lawyer information, etc.; secondary labels are multiple categories under a label in the primary labels, for example, the basic information label of the document may include document number, document name, document type, production unit, case category, case trial stage, etc.; and so on, tertiary labels are multiple categories under a label in the secondary labels; the data type defined by output defines the output type of each label, such as character type, logical type, character type, and text type; some examples are given in the example of extracted values, such as the document number is (2017) Ji 1182 Criminal First Instance No. 398, the document type is a judgment, the production unit is the People's Court of XX Province, the case category is a criminal case, and the case trial stage is the first instance; the legal meaning of the label is an explanation of the meaning of the label.
[0033] Optionally, the entity labeling system of different types of legal documents may include the same elements or different elements. Furthermore, the entity labeling system can be divided into common labeling categories and unique labeling categories, where the common labeling categories refer to the elements included in all types of legal documents, such as the defendant's name, gender, ID number and other element information, and the unique labeling categories refer to the element information unique to a certain type of legal document, such as the "whether to drink" element can be included in the legal documents of dangerous driving crimes.
[0034] Specifically, in response to the user's request for processing a legal document, the target legal document input by the user is obtained from the visual interactive interface, and the entity tag system of the target legal document can be obtained from a pre-set tag library according to the type of the target legal document. Optionally, the tag library includes entity tag systems of various types of legal documents.
[0035] S120. Extract legal elements from the target legal document based on the entity labeling system of the target legal document.
[0036] Among them, legal elements refer to the information units that users are concerned about in legal documents, which may include defendant information, trial information, institution names, place names, time and other important information in legal documents. Further, the legal elements in this embodiment may specifically be the specific content in the target legal document corresponding to each tag in the entity tag system of the target legal document.
[0037] Optionally, the target legal document and the entity tag system of the target legal document can be input into a pre-trained neural network model, and then the specific content of the target legal document corresponding to each tag in the entity tag system of the target legal document, that is, the legal element, can be obtained. Furthermore, other methods can be used to extract legal elements from the target legal document, which will be described in detail in subsequent embodiments.
[0038] S130. Based on the entity labeling system of the target legal document, a structured document of the target legal document is obtained according to the extracted legal elements.
[0039] Among them, the structured document is the abstract content system of the target legal document, which is mainly composed of the entity label system of the target legal document and the main information obtained by extracting information from the target legal document. It can exist in the form of Word table or Excel.
[0040] Specifically, after the legal elements are extracted, the extracted legal elements can be filled into the entity tag system of the target legal document, thereby obtaining a structured document of the target legal document.
[0041] The technical solution provided by the embodiment of the present invention introduces the entity tag system of the target legal document, and based on the entity tag system of the target legal document, extracts the legal elements from the target legal document, and then obtains the structured document of the target legal document based on the extracted legal elements, so that users such as judges can quickly capture important information from the structured document. Compared with the prior art, this embodiment significantly enhances the actual information extraction effect and improves the user experience by automatically constructing the structured document of the legal document, and provides a new idea for quickly reading important information from the legal document.
[0042] In order to further enhance the user experience, a display step is added on the basis of the above embodiment. Optionally, after obtaining the structured document of the target legal document, the target legal document and the structured document may be associated and displayed.
[0043] In an optional method of this embodiment, when presenting to the user, the target legal document and the structured document are presented to the user at the same time, and the relevant content in the target legal document is associated with the label in the structured document. When it is detected that the user's mouse is pointing to a label in the structured document, the relevant content at the corresponding position in the target legal document is highlighted, and the user is prompted with the location of the relevant information so that the user can view it.
[0044] In order to avoid the situation in which the user is unable to quickly capture the required information due to too much content being highlighted at one time in the above-mentioned display method, in another optional method of the present embodiment, when displaying to the user, the target legal document and the structured document are displayed to the user at the same time. When it is detected that the user's mouse is pointing to the header of the target legal document, the relevant information in the header is highlighted according to the structured document and displayed to the user so that the user can quickly find the relevant information.
[0045] It can be understood that by associating the target legal document and the structured document and displaying them to the user, the user can see both the target legal document and the structured document, and can also find the content of the target legal document from the corresponding position content association in the structured document, which is convenient for the user to consult and improves the user experience.
[0046] Because legal documents need to be written based on the writing standards of documents, usually different document elements are in fixed logical parts of legal documents, and in order to improve the accuracy of label recognition, as an optional solution of this embodiment, before extracting legal elements from the target legal document based on the entity label system of the target legal document, the target legal document can be segmented according to the writing format of the target legal document. Specifically, the legal document is segmented according to the legal document business standards, and the document is divided into the header, defendant information, litigation record, etc.
[0047] Embodiment 2
[0048] Figure 2 It is a flow chart of a document processing method provided in the second embodiment of the present invention. This embodiment is optimized on the basis of the above embodiment.
[0049] Furthermore, “extracting legal elements from the target legal document based on the entity labeling system of the target legal document” is optimized to “extracting the first legal element from the target legal document according to the set entity extraction rules based on the entity labeling system of the target legal document; extracting the second legal element from the target legal document using the entity extraction model based on the entity labeling system of the target legal document” to optimize the method of extracting legal elements.
[0050] like Figure 2 The document processing method shown includes:
[0051] S210. In response to the user's request for processing a legal document, an entity tag system of the target legal document is obtained.
[0052] S220. Based on the entity labeling system of the target legal document, extract the first legal element from the target legal document according to the set entity extraction rules.
[0053] Exemplarily, for the regular tags in the entity tag system based on the target legal document, the first legal element will be extracted from the target legal document according to the set entity extraction rules. In this embodiment, the set entity extraction rules refer to a rule for extracting the first legal element from the target legal document. Specifically, it can be an information extraction rule that extracts information using regular expressions based on information such as keywords. It should be noted that the entity extraction rules in this embodiment are mainly set for the regular tags in the entity tag system of the target legal document. Specifically, it can be achieved by analyzing a large number of legal documents of the same type as the target legal document to formulate rules for certain tags, that is, the set entity extraction rules.
[0054] For example, if the target legal document is a judgment of the crime of causing traffic accidents, the entity tag system of the target legal document may include a license plate number tag, which is regular for the license plate number. Furthermore, license plates can be divided into traditional license plates and new energy vehicle license plates. For traditional license plates, the first digit is the abbreviation of the province, which is a Chinese character, the second digit is the code of the license-issuing authority, which is any letter from A to Z, the third to seventh digits are the serial numbers, which are composed of numbers or letters, and there are no letters I and O to prevent confusion with the numbers 1 and 0, and the last digit may be one of the Chinese characters "gua xue jing gang ao shi ling". For new energy vehicle license plates, the first and second digits are the same as those of traditional license plates, and the third to eighth digits are the serial numbers, which are one more digit than traditional license plates. Specifically, the serial number rules for the third to eighth digits are as follows: for small vehicles, the third digit can only be the letter D or F, the fourth digit can be a number or a letter, and the fifth to eighth digits must be numbers; for large vehicles, the third to seventh digits must be numbers, and the eighth digit can only be the letter D or F.
[0055] Specifically, after determining the entity tag system of the target legal document, the entity extraction rules for the regular tags in the entity tag system of the target legal document can be obtained, and the obtained entity extraction rules can be used to extract the first legal element from the target legal document. For example, based on the license plate number extraction rules, the license plate number can be extracted from the target legal document.
[0056] S230. Based on the entity tag system of the target legal document, use an entity extraction model to extract the second legal element from the target legal document.
[0057] Exemplarily, for the tags that are not regular in the entity tag system of the target legal document, use an entity extraction model to extract the second legal element from the target legal document. Among them, the entity extraction model can be a model for information extraction based on a machine learning model.
[0058] In an alternative manner of this embodiment, the determination of the entity extraction model can be: training a machine learning model based on samples to obtain the entity extraction model.
[0059] Since the scale of annotated samples is small, resulting in large errors in training the machine learning model, therefore, in another optional method of this embodiment, the entity extraction model may also be determined by: expanding the sample based on the synonym corpus and / or the type of label content in the sample; and training the machine learning model based on the expansion results and the sample to obtain the entity extraction model.
[0060] Among them, according to the synonym corpus and / or the type of label content in the sample, the sample can be expanded by: using the traditional data enhancement method of Natural Language Processing (NLP), such as performing at least one of synonym replacement, random insertion and random exchange according to the synonym corpus; and / or, replacing according to the type of label content in the sample, for example, re-embedding the two entities of vise and scissors in the descriptions of "using vise to cut the wire" and "cutting the cable with scissors" in random order, and obtaining two new labeled samples of "using scissors to cut the wire" and "cutting the cable with vise". It can be understood that by expanding the sample, the sample is further enriched and the accuracy of the model is improved.
[0061] Optionally, the entity extraction model in this embodiment can be composed of a BERT (Bidirectional Encoder Representations from Transformers) model and a Conditional Random Field (CRF) model. For example, if the target legal document belongs to a criminal judgment of theft, the process of determining the entity extraction model can be: first select a model of the BERT series, such as BERT, and use a large number of criminal judgments of theft to train a complete BERT model. Then, a large number of criminal judgments of theft are annotated, and the vectors of each word in the document are extracted as features through BERT. Finally, the features are sent to a traditional Named Entity Recognition (NER) model such as CRF. CRF is learned based on the annotated data to obtain a BERT+CRF model that can extract the legal entity of theft. Optionally, the BERT parameters can be fixed and the NER model can be fine-tuned using the annotated data.
[0062] Furthermore, based on the entity labeling system of the target legal document, the BERT (Bidirectional Encoder Representations from Transformers) model and the Conditional Random Field (CRF) model are used to extract the second legal element from the target legal document.
[0063] Optionally, based on the entity tag system of the target legal document, extracting the legal element from the target legal document may be: combining the first legal element and the second legal element as the legal element extracted from the target legal document.
[0064] S240. Based on the entity labeling system of the target legal document, a structured document of the target legal document is obtained according to the extracted legal elements.
[0065] The technical solution provided by the embodiment of the present invention extracts legal elements from the target legal document by introducing a combination of entity extraction rules and entity extraction models, thereby ensuring the accuracy of the extracted legal elements and improving the efficiency of legal element extraction; thereafter, a structured document of the target legal document can be obtained based on the extracted legal elements, so that users such as judges can quickly capture important information from the structured document, thereby simplifying the complexity of the legal document reading operation and thereby improving work efficiency.
[0066] As an optional method of this embodiment, the entity extraction rules and entity extraction models set in this embodiment may also have a labeling function. Specifically, the set entity extraction rules and entity extraction models may be added to the document labeling system to achieve pre-labeling of the document. The document labeling system refers to importing documents into the labeling system, and the documents in the document may be labeled, for example: criminal suspect Li XX, where "Li XX" is labeled with a name. The system may be deployed on a server.
[0067] Furthermore, the entity extraction rules and entity extraction models set in this embodiment can be obtained by optimizing the document annotation system. For example, the document annotation system embedded with the initial entity extraction rules and initial entity extraction model can be handed over to annotators for use, and the annotators perform annotation work on a large number of legal documents. The document annotation system records the correct annotation results, incorrect annotation results, and omitted annotation results. After that, the data annotated by the document annotation system is resubmitted for training by the initial entity extraction rules and initial entity extraction model, and the iteration is continued. When the optimal document annotation system is finally obtained, a high-precision entity extraction model and entity extraction rules can be obtained.
[0068] Embodiment 3
[0069] Figure 3 It is a flow chart of a document processing method provided in the third embodiment of the present invention. This embodiment is optimized on the basis of the above embodiment.
[0070] Furthermore, after "obtaining the structured document of the target legal document", add the feature "responding to the user's tag search request, querying from the structured document according to the target tag, and obtaining the tag content associated with the target tag; and feeding back the tag content associated with the target tag to the user".
[0071] like Figure 3 The document processing method shown includes:
[0072] S310. In response to the user's request for processing a legal document, an entity tag system of the target legal document is obtained.
[0073] S320. Extract legal elements from the target legal document based on the entity labeling system of the target legal document.
[0074] S330. Based on the entity labeling system of the target legal document, a structured document of the target legal document is obtained according to the extracted legal elements.
[0075] S340. In response to the user's tag search request, query the structured document according to the target tag to obtain tag content associated with the target tag.
[0076] Among them, the tag search request refers to the request sent by the user when obtaining the tag content associated with a certain tag / tags. For example, the user can input relevant parameters such as the target tag according to the prompt information in the visual interactive interface, and click the submit button or control, etc., thereby triggering the generation of the tag search request. In this embodiment, the target tag can be one or more tags in the structured document of the target legal document.
[0077] Specifically, in response to the user's tag search request, the user's target tag is obtained from the visual interactive interface, and then the target tag can be used as a search term and input into the structured document of the target legal document to obtain the content associated with the target tag, and the tag content associated with the target content can be fed back to the user, that is, S350 is executed.
[0078] S350: Feedback tag content associated with the target tag to the user.
[0079] Optionally, when the user needs to read a type of legal document, the user can click on the case query control in the visual interactive interface; a window for entering the case type will pop up; accordingly, the user enters traffic accident; this embodiment can use the traffic accident entered by the user as a search term to query from a large number of structured documents, and query the structured documents of cases related to traffic accidents, and can feed back the structured documents of these cases to the user so that the user can browse them intuitively and quickly to obtain relevant information.
[0080] The technical solution provided by the embodiment of the present invention responds to the tag search request of the user, queries from the structured document according to the target tag, obtains the tag content associated with the target tag, and feeds back the tag content associated with the target tag to the user. This allows the user to obtain the desired result conveniently and intuitively, reduces the time and energy of the user to browse the materials, and improves the user experience.
[0081] Embodiment 4
[0082] Figure 4 This is a schematic diagram of the structure of a document processing device provided in the fourth embodiment of the present invention. This embodiment can be applied to the situation of how to process legal documents so as to quickly extract important information from legal documents. The device can be implemented by software and / or hardware, and can be integrated into a computing device that carries a text processing function, such as a server device.
[0083] like Figure 4 The document processing device shown includes an entity tag system acquisition module 410, a legal element extraction module 420 and a structured document determination module 430, wherein:
[0084] An entity tag system acquisition module 410 is used to determine the entity tag system of the target legal document in response to the user's document processing request;
[0085] A legal element extraction module 420, for extracting legal elements from a target legal document based on an entity tagging system of the target legal document;
[0086] The structured document obtaining module 430 is used to obtain the structured document of the target legal document based on the entity tagging system of the target legal document and the extracted legal elements.
[0087] The embodiment of the present application introduces the entity tag system of the target legal document, and based on the entity tag system of the target legal document, extracts legal elements from the target legal document, and then obtains the structured document of the target legal document based on the extracted legal elements, so that users such as judges can quickly capture important information from the structured document. Compared with the prior art, this embodiment significantly enhances the actual information extraction effect and improves the user experience by automatically constructing the structured document of the legal document, and provides a new idea for quickly reading important information from the legal document.
[0088] Furthermore, the legal element extraction module 420 includes:
[0089] A first legal element extraction unit, configured to extract a first legal element from the target legal document based on an entity labeling system of the target legal document and a set entity extraction rule;
[0090] The second legal element extraction unit is used to extract the second legal element from the target legal document based on the entity labeling system of the target legal document and adopting the entity extraction model.
[0091] Furthermore, the entity extraction model is determined as follows:
[0092] Expand the sample based on the synonym corpus and / or the type of label content in the sample;
[0093] Based on the extended results and samples, the machine learning model is trained to obtain the entity extraction model.
[0094] Furthermore, the above device also includes:
[0095] The segmentation processing module is used to segment the target legal document according to the writing format of the target legal document.
[0096] Furthermore, the above device also includes:
[0097] The associated display module is used to display the target legal document and the structured document in an associated manner.
[0098] Furthermore, the above device also includes:
[0099] The tag content obtaining module is used to respond to the tag search request of the user, query from the structured document according to the target tag, and obtain the tag content associated with the target tag;
[0100] The tag content feedback module is used to provide users with feedback on the tag content associated with the target tag.
[0101] The document processing device provided in the embodiment of the present invention can execute any document processing method provided in the embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the document processing method.
[0102] Embodiment 5
[0103] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. Figure 5 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 5 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. Optionally, the electronic device can be a server device that carries a word processing function.
[0104] like Figure 5As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that connects various system components (including the memory 28 and the processing unit 16).
[0105] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0106] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0107] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0108] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0109] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0110] The processing unit 16 executes various functional applications and data processing by running the programs stored in the memory 28, such as implementing the document processing method provided in the embodiment of the present invention.
[0111] Embodiment 6
[0112] Embodiment 6 of the present invention further provides a computer-readable storage medium on which a computer program (or computer-executable instructions) is stored. When the program is executed by a processor, it is used to execute the document processing method provided in the embodiment of the present invention.
[0113] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0114] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0115] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0116] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0117] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A document processing method, characterized in that: include: In response to a user's request for processing a legal document, obtaining an entity tag system of a target legal document; Extracting legal elements from the target legal document based on the entity labeling system of the target legal document; Based on the entity tag system of the target legal document, and according to the extracted legal elements, a structured document of the target legal document is obtained; Based on the entity tag system of the target legal document, extract legal elements from the target legal document, including: Based on the entity labeling system of the target legal document, according to the set entity extraction rules, the first legal element is extracted from the target legal document; based on the entity labeling system of the target legal document, the second legal element is extracted from the target legal document by using the entity extraction model; The set entity extraction rules are aimed at labels with regularity in the entity labeling system of the target legal document; the entity extraction model is aimed at labels without regularity in the entity labeling system of the target legal document; the entity extraction model is composed of a BERT model and a conditional random field model; The entity extraction model is determined in the following way: Expanding the sample according to the synonym corpus and / or the type of label content in the sample; Training the machine learning model according to the expansion result and the sample to obtain an entity extraction model; After obtaining the structured document of the target legal document, the method further includes: displaying the target legal document in association with the structured document; After obtaining the structured document of the target legal document, it also includes: In response to a tag search request from a user, query the structured document according to a target tag to obtain tag content associated with the target tag; and feed back the tag content associated with the target tag to the user; When displaying the target legal document to the user, the target legal document and the structured document are displayed to the user at the same time. When it is detected that the user's mouse points to the header of the target legal document, the relevant information in the header is highlighted according to the structured document and displayed to the user; Based on the entity tag system of the target legal document, before extracting the legal elements from the target legal document, the method further includes: segmenting the target legal document according to the writing format of the target legal document; The method further includes: adding the entity extraction rules and entity extraction model to a document annotation system, thereby achieving pre-annotation of the document.
2. A document processing device, used to execute the document processing method according to claim 1, characterized in that: include: An entity tag system acquisition module, used to respond to a user's legal document processing request and acquire an entity tag system of a target legal document; A legal element extraction module, used for extracting legal elements from a target legal document based on an entity labeling system of the target legal document; A structured document determination module, configured to obtain a structured document of the target legal document based on the entity tag system of the target legal document and the extracted legal elements; A first legal element extraction unit, configured to extract a first legal element from the target legal document based on an entity labeling system of the target legal document and a set entity extraction rule; A second legal element extraction unit, configured to extract a second legal element from the target legal document by using an entity extraction model based on an entity labeling system of the target legal document; The set entity extraction rules are aimed at labels with regularity in the entity labeling system of the target legal document; the entity extraction model is aimed at labels without regularity in the entity labeling system of the target legal document; the entity extraction model is composed of a BERT model and a conditional random field model; The entity extraction model is determined in the following way: Expand the sample based on the synonym corpus and / or the type of label content in the sample; Based on the expansion results and the samples, the machine learning model is trained to obtain an entity extraction model.
3. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the document processing method as claimed in claim 1.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the document processing method as claimed in claim 1 is implemented.
Citation Information
Patent Citations
Judicial judgment case information structural processing system
CN109344187A