Text recognition method and device, nonvolatile storage medium and computer device

By using machine learning models to identify events and entities in judicial documents, the difficulty of forming structured texts caused by the multiple identities of perpetrators in complex cases has been solved, achieving accurate text recognition and structured processing.

CN115080709BActive Publication Date: 2025-12-12ALIBABA INNOVATION PRIVATE LIMITED
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110276318.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-15
Publication Date
2025-12-12
Estimated Expiration
2041-03-15

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively handle the problem of complex cases in judicial documents where the multiple identities of the perpetrators prevent the formation of structured texts.

Method used

The event recognition model and entity recognition model in the machine learning model are used to perform dual recognition of the text to be recognized, and the event type, event trigger word, entity and argument information are determined respectively. The event information is determined by combining the first recognition result and the second recognition result.

Benefits of technology

It enables accurate identification of multiple identities of perpetrators in complex cases, forming structured text and improving the accuracy and completeness of text recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080709B_ABST
    Figure CN115080709B_ABST
Patent Text Reader

Abstract

The application discloses a text recognition method and device, a nonvolatile storage medium and a computer device. The method comprises the following steps: obtaining a text to be recognized; using an event recognition model in a machine learning model to recognize the text to be recognized, and obtaining a first recognition result, wherein the first recognition result comprises an event type in the text to be recognized and an event trigger word corresponding to the event type; using an entity recognition model in the machine learning model to recognize the text to be recognized, and obtaining a second recognition result, wherein the second recognition result comprises an entity and an argument corresponding to each event type; and determining event information corresponding to each event type based on the first recognition result and the second recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of machine learning, in particular, to a text recognition method and device, a non-volatile storage medium and a computer device. BACKGROUND

[0002] In the field of intelligent justice, the judicial document analysis platform, as a typical application of NLP in the judicial field, carries the foundation of knowledge and shoulders the analysis and analysis of various documents (judgment and prosecution, judgment, court record, evidence materials, etc.) in the judicial field. In the judicial document analysis platform, entity extraction and event extraction are essential natural language processing tasks. The basic ability abstracts the fact of a large number of text descriptions in the document, forms a structured text and outputs it, which can make the fact more clearly present to the user, and clarify the context of event development, the relationship between events and events. At the same time, it forms the necessary foundation for various tasks upstream.

[0003] In a complex event description, the "action / reaction" of the actor will change, and even in a complex event, the actor has multiple identities. For example: "Wang Mou pursued Li Mou and knocked him down after being robbed", Wang Mou is both the victim of "property" crime and the perpetrator of "personal" crime. However, the prior art cannot solve the four basic problems of classification recognition, trigger word recognition, event element extraction, and argument discrimination at one time, and some ideal basic assumptions are based at the beginning of the design, such as: the overlap between elements is not obvious; the subject and object in the event represented by the same sentence are consistent and will not change; the relationship between the entity elements and the trigger words in the event is simple. Figure One After statistics, such a system can solve 90% of the event situation in the criminal case of the judicial document. However, obviously, in the real scene, complex events exist, and solving the extraction problem of these complex events is a difficult problem to overcome.

[0004] At present, no effective solution has been proposed to solve the above problems.

[0005] SUMMARY

[0006] The embodiments of the present application provide a text recognition method, device, non-volatile storage medium and computer device to at least solve the technical problem that the structured text cannot be formed due to the inability to handle the multiple identities of the actor in complex cases.

[0007] ​According to an aspect of an embodiment of the present application, a text recognition method is provided, including: obtaining to-be-recognized text; performing recognition on the to-be-recognized text by using an event recognition model in a machine learning model to obtain a first recognition result, wherein the first recognition result includes an event type in the to-be-recognized text and an event trigger word corresponding to the event type; performing recognition on the to-be-recognized text by using an entity recognition model in the machine learning model to obtain a second recognition result, wherein the second recognition result includes an entity and an argument corresponding to each event type; and determining event information corresponding to each event type based on the first recognition result and the second recognition result.

[0008] According to another aspect of an embodiment of the present application, a text recognition method is also provided, including: obtaining to-be-recognized text; performing first recognition on the to-be-recognized text to obtain a first recognition result, wherein the first recognition result includes an event type in the to-be-recognized text and an event trigger word corresponding to the event type; performing second recognition on the to-be-recognized text to obtain a second recognition result, wherein the second recognition result includes an entity and an argument corresponding to each event type; and determining event information corresponding to each event type based on the first recognition result and the second recognition result.

[0009] According to another aspect of an embodiment of the present application, a text recognition apparatus is also provided, including: an obtaining module, configured to obtain to-be-recognized text; a first recognition module, configured to perform recognition on the to-be-recognized text by using an event recognition model in a machine learning model to obtain a first recognition result, wherein the first recognition result includes an event type in the to-be-recognized text and an event trigger word corresponding to the event type; a second recognition module, configured to perform recognition on the to-be-recognized text by using an entity recognition model in the machine learning model to obtain a second recognition result, wherein the second recognition result includes an entity and an argument corresponding to each event type; and a determining module, configured to determine event information corresponding to each event type based on the first recognition result and the second recognition result.

[0010] According to another aspect of an embodiment of the present application, a nonvolatile storage medium is also provided, including a stored program, wherein when the program is running, the nonvolatile storage medium controls a device in which the nonvolatile storage medium is located to perform a text recognition method.

[0011] According to a further aspect of the embodiments of the present application, a computer device is also provided, comprising: a processor; and a memory connected with the processor, configured to provide the processor with instructions to process the following processing steps: obtaining to-be-recognized text; recognizing the to-be-recognized text by using an event recognition model in a machine learning model to obtain a first recognition result, wherein the first recognition result comprises event types in the to-be-recognized text and event trigger words corresponding to the event types; recognizing the to-be-recognized text by using an entity recognition model in the machine learning model to obtain a second recognition result, wherein the second recognition result comprises entities and argument information corresponding to each event type; and determining event information corresponding to each event type based on the first recognition result and the second recognition result.

[0012] In the embodiments of the present application, the to-be-recognized text is obtained, the to-be-recognized text is recognized by using an event recognition model in a machine learning model to obtain a first recognition result, wherein the first recognition result comprises event types in the to-be-recognized text and event trigger words corresponding to the event types, the to-be-recognized text is recognized by using an entity recognition model in the machine learning model to obtain a second recognition result, wherein the second recognition result comprises entities and argument information corresponding to each event type, and event information corresponding to each event type is determined based on the first recognition result and the second recognition result, so that the event types and the entities and argument information corresponding to each event type are recognized, the purpose of determining the event information corresponding to each event type is achieved, the technical effect of recognizing complex text is achieved, and the technical problem that the structured text cannot be formed due to the inability to handle the multiple identities of the actors in complex cases is solved. BRIEF DESCRIPTION OF DRAWINGS

[0013] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, but do not constitute improper limitations on the present application. In the drawings:

[0014] Figure 1 is a hardware structure block diagram of a computer terminal according to an embodiment of the present application;

[0015] Figure 2 is a flowchart of a text recognition method according to an embodiment of the present application;

[0016] Figure 3 is a flowchart of another text recognition method according to an embodiment of the present application;

[0017] Figure 4 is a structure diagram of a text recognition device according to an embodiment of the present application;

[0018] Figure 5is a workflow schematic diagram of a text recognition method according to an embodiment of the application;

[0019] Figure 6a is an event classification result schematic diagram according to an embodiment of the application;

[0020] Figure 6b is an entity and argument recognition result schematic diagram according to an embodiment of the application;

[0021] Figure 7 is an algorithm position schematic diagram of a text recognition method according to an embodiment of the application in judicial document analysis;

[0022] Figure 8 is an interactive interface schematic diagram of a text recognition method according to an embodiment of the application. DETAILED DESCRIPTION

[0023] In order to enable persons skilled in the art to better understand the present application scheme, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should be within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0025] First, some of the nouns or terms that appear in the description of the embodiments of the present application are applicable to the following explanations:

[0026] Pre-trained Language Model: pre-trained language model. In recent years, models such as BERT have been pre-trained based on a large amount of corpus through a language model loss function, and have achieved strong results in a series of natural language processing (NLP) tasks.

[0027] BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model that has achieved state-of-the-art performance on multiple natural language processing tasks.

[0028] Event extraction: presenting unstructured text containing event information in a structured form, which has wide applications in fields such as automatic summarization, automatic question answering, and information retrieval.

[0029] MRC (Machine Reading Comprehension) is a technology that, given an article (context) and a question based on the article (question), enables a machine to answer the question after reading the article. The task involved in this design only requires selecting the relevant passage from the article that can answer the question; this is the "passage selection" task.

[0030] Entity nesting: In entity recognition tasks, there are nested entities that are identified. For example, "Peking University" is not only an organization, but "Beijing" is also a location.

[0031] Example 1

[0032] According to an embodiment of this application, a method embodiment for text recognition is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0033] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a text recognition method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1The illustrated structure is merely schematic and does not limit the structure of the electronic device described above. For example, the computer terminal 10 can further include more or less components than those shown, or have a different configuration of components than that shown. Figure 1 Figure 1 The illustrated structure is merely schematic and does not limit the structure of the electronic device described above. For example, the computer terminal 10 can further include more or less components than those shown, or have a different configuration of components than that shown.

[0034] It should be noted that the one or more processors 102 and / or other data processing circuitry described above can be referred to herein generally as "data processing circuitry". The data processing circuitry can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. Furthermore, the data processing circuitry can be a single standalone processing module, or incorporated in whole or in part within any one of the other elements of the computer terminal 10 (or mobile device). As referred to in embodiments of the present application, the data processing circuitry functions as a processor to control, for example, the selection of the variable resistance terminal path connected to the interface.

[0035] The memory 104 can be used to store software programs of application software and modules, such as program instructions / data storage means corresponding to the text recognition method in embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, i.e. implements the vulnerability detection method of the application program described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further include a memory disposed remotely with respect to the processor 102, which can be connected to the computer terminal 10 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0036] The transmission module 106 is configured to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module configured to communicate with the Internet in a wireless manner.

[0037] The display can be, for example, a touch screen type liquid crystal display (LCD) that enables a user to interact with the user interface of the computer terminal 10 (or mobile device).

[0038] In the above-described operating environment, the present application provides a text recognition method as shown in Figure 2 ​​Figure 2 is a flowchart of a text recognition method according to an embodiment of the present application, as shown in the figure, the method comprises the following steps: Figure 2

[0039] S202, obtaining to-be-recognized text;

[0040] S204, recognizing the to-be-recognized text by using an event recognition model in a machine learning model to obtain a first recognition result;

[0041] The first recognition result includes an event type in the to-be-recognized text and an event trigger word corresponding to the event type. As shown in the figure, the event type "property" corresponds to the event trigger word "robbed", and the event type "person" corresponds to the event trigger word "stabbed to death". Figure 6a

[0042] In some embodiments of the present application, the event recognition model is obtained by the following method:

[0043] A plurality of groups of first sample data are input into the event recognition model for training, wherein each group of data in the plurality of groups of first sample data includes a first sample text, a first question template for determining an event trigger word in the first sample text, answer information corresponding to the first question template, and an event type. For example, the first text sample can be "Xu drives to A Road gas station section, and hits Deng, a pedestrian in the same direction", the first question template can be "what is the trigger word of the event", and the corresponding answer information is "hit down", and the corresponding event type is "social-traffic accident".

[0044] S206, recognizing the to-be-recognized text by using an entity recognition model in a machine learning model to obtain a second recognition result;

[0045] The second recognition result includes entities and argument information corresponding to each event type. Specifically, in some embodiments of the present application, the entity refers to information such as the time, place, and consequences of a case, and the argument refers to the offender and victim in the case. As shown in the figure, the consequences of the case are that the offender stabs the victim to death, the offender of the case is "Wang Yang", and the victim of the case is "Song". Figure 6b

[0046] In some embodiments of the present application, the event recognition model is obtained by the following method:

[0047] ​​​The second sample data groups are input into the event recognition model for training, where each of the second sample data groups includes second sample text, a second question template for determining entities and arguments in the second sample text, and answer information corresponding to the second question template. For example, the second sample text can be "Wang steals Song's bag and kills the victim", the second question template is "Who is the perpetrator of the property theft and robbery event triggered by the robbery?" and "Who is the victim of the personal injury and killing event triggered by the killing?", and the answer information corresponding to the question template is "Wang".

[0048] In some embodiments of the present application, the event recognition model and the entity recognition model are the same pre-trained language model, such as a bert model, and the event recognition model and the entity recognition model use the same model parameters. That is, the model parameters updated after training the event recognition model can also be used to update the model parameters of the entity recognition model. Similarly, the model parameters updated after training the entity model can also be used to update the model parameters of the event recognition model.

[0049] In some embodiments of the present application, in order to better identify the text, the pre-trained language model can be constructed into a machine reading comprehension model. However, since the text to be identified is not a natural reading comprehension problem, in order to improve the accuracy of the model, the construction of the question becomes very critical. For the reading comprehension task of the two stages of event recognition and entity argument recognition, the question of each stage can be constructed using the slot filling method.

[0050] For stage one, the question can be set as: What is the trigger word of the event? By searching for the answer to the question in the context (the context of the sentence to be identified), the trigger word of the event is obtained. And since the type of event can be greater than 1, the answer to the question can be multiple words, or even there is an intersection between the words, which can be supported by the reading comprehension model. For example:

[0051] Example:

[0052] Q: What is the trigger word of the event?

[0053] C: Xu drives to the gas station section of Ganzhong Avenue and knocks down Deng, a pedestrian going in the same direction.

[0054] A: Knock down (social-traffic accident)

[0055] For stage two, the question template can be set as: What / who is the <entity name / argument name> of the <event classification> type event triggered by <trigger word>? Assuming that the label set of all entities and arguments of the data set is Y, then for each entity label y and each trigger word x predicted in stage one, there is a question q(x, y) about it. Take the following example:

[0056] C: Wang grabbed Song's bag and killed the victim.

[0057] Q: Who is the perpetrator of the property-theft robbery extortion type event triggered by the robbery?

[0058] A: Wang

[0059] Q: Who is the victim of the personal-injury homicide assault type event triggered by the killing?

[0060] A: Song

[0061] In this way, when processing complex events, the model can extract entities and arguments (perpetrator / victim) associated with specific events.

[0062] After determining the question or question template for each stage, the specific training data construction process for the machine reading comprehension model is as follows:

[0063] In the first stage, given a text sequence W of length N as the model's context, set the question Q1 "What is the trigger word of the event?" and obtain multiple (question-context-answer) triples, each answer corresponding to a different event trigger class. If there are several types of events, several triples will be generated. These triples are training instances. For each event type i, Ej(starti:endi) can be used to represent the trigger word j of event type i. If start and end (where start is the start position of the entity and end is the end position of the entity) are not found, it means that the text does not have a trigger word for event i, i.e., it does not belong to this event classification. If start and end are found, the trigger word of the event can be obtained by the interval context[start:end] (i.e., the start position to the end position of the event in the text).

[0064] Similarly, in the second stage, the question filling can be performed by means of the known trigger words, the question Q2 is set, and the event type to be processed in this input is circled. For multiple events, multiple questions can be set, and the total number of triples obtained is: event type number * entity number. Similarly, the start and end pointers can be used to predict the position of a specific entity. The extraction result of a specific entity type under a certain event trigger word is obtained through the interval of context[start:end].

[0065] In the training stage of the whole model, a deep pre-training model BERT can also be used as an encoder, and a sentence is given as input: (ω1, ω2,..., ω n ), wherein n is the length of the text, and ω represents a character. The filled question is: (q1: q2,..., q m ), m is the length of the whole question, and q represents a character. A special [CLS] character and a [SEP] character (the two characters are the flag bits of the bert language, wherein the [CLS] character is at the head of the question, and the [SEP] character is at the tail of the question) are added before the question and between the question and the context before entering the network: the overall input of the model is {[CLS], q(1), q(2),..., q(m), [SEP], ω(1), ω(2),..., ω(n)}. In the model, the last hidden state of each layer of [CLS] can be used for splicing, which is used as the representation of the vector space of the whole sequence, and will be used in the event classification module. The remaining part of the sequence vector output by the BERT model will be directly used in the reading comprehension module, as follows:

[0066]

[0067] C=H0

[0068] In the above formula, BERT is a pre-training model, Θ represents all learnable parameters in the model, ω 0:k represents the kth token (mark) in the input. H represents the hidden state vector output after the tokens pass through the BERT model. Since [CLS] token is added at the beginning of the original sentence, H0=C=[CLS] hidden vector representation. The rest of H represents the hidden vector corresponding to the token position.

[0069] The reading comprehension model identifies start and end: each character is predicted whether it is the beginning of an entity or the end of an entity.

[0070] The above describes a way of constructing training data. Since the model is a pipeline system, when the actual training phase is performed, the model first runs the first stage, and fills the second stage problem template with the type and trigger word predicted by the first stage as input. Then the second stage is run, and finally all the results are obtained.

[0071] In S208, event information corresponding to each event type is determined based on the first recognition result and the second recognition result respectively.

[0072] In some embodiments of the present application, in order to improve the quality of text recognition, before determining the event information corresponding to each event type based on the first recognition result and the second recognition result respectively, it is also necessary to first count the first number of event trigger words in the text to be recognized, and the second number of event types in the text to be recognized, then compare the size of the first number and the second number, and then determine the target event trigger word by screening all event trigger words in the text to be recognized according to the comparison result.

[0073] Specifically, the target event trigger word is obtained by screening all event trigger words in the text to be recognized according to the comparison result, including: when the comparison result indicates that the first number is greater than the second number, it means that some non-event trigger words are misrecognized as target trigger words, and the evaluation index of all event trigger words in the text to be recognized is determined, the evaluation index includes the confidence of the event trigger word, and the confidence refers to the relevance of the event trigger word and the event corresponding to the event trigger word. The confidence can be obtained by statistically analyzing a large number of legal texts to obtain the probability that the event corresponding to a certain event trigger word in the text actually conforms to the event. The all event trigger words in the text to be recognized are sorted according to the size of the evaluation index; and the target event trigger word is selected from the first number of event trigger words according to the sorting result. It should be noted that the number of target event trigger words selected from the first number of event trigger words is the same as the second number.

[0074] When the comparison result indicates that the first number is less than the second number, prompt information for prompting that the recognition result of the event trigger word is incorrect is generated. It can be understood that when the first number, that is, the number of event trigger words, is less than the second number of event types, it means that there is a misrecognition, that is, all event trigger words cannot be accurately recognized, or some event types are misrecognized.

[0075] In some embodiments of the present application, when it is found that the first number is not zero and the second number is zero, a prompt message is sent and the following step is refused to be executed: determining event information corresponding to each event type based on the first recognition result and the second recognition result respectively. In order to better understand Figure 2The working process of the text recognition method shown, the following will be further explained in combination with Figure 5 The working process of the text recognition method shown, the following will be further explained in combination with Figure 5 The working process shown in the flow chart comprises the following steps:

[0076] S502, inputting the facts in the judicial documents;

[0077] S504, segmenting the paragraphs;

[0078] S506, judging whether the traversal is finished, if yes, executing step S516, if no, executing step S508;

[0079] S508, event classification and trigger word recognition;

[0080] S510, processing the classification results by using the number of event classification;

[0081] S512, filling the question sentence with each recognized trigger word, and recognizing all possible entities under the classification;

[0082] S514, obtaining a complete event or multiple events, and then executing step S506;

[0083] S516, arranging multiple facts in the order of events.

[0084] As Figure 5 shown, in order to solve the problem that there are multiple events in a sentence, each event has different corresponding entities and arguments, such as: “Wang Mou pursued Li Mou and knocked him down after being robbed”; “Wang Mou robbed on the 12th day and killed the next day”. For such complex events, the present application designs a pipeline system. In addition to the logic of segmenting the pre-processing and the previous system, the model part of the deep learning is divided into two parts, which are: the event classification stage and the entity and argument recognition stage, and Figure 5 the first stage and the second stage.

[0085] In the first stage, the task of the model is to identify the event trigger word and classify the number of events for the input sentence. By identifying different types of trigger words, the classification of events is realized. For example, the successful identification of the “property” trigger word “robbed” means that the event classification can be classified into the “property” category. In addition, the result of the event number classification can be used to correct the trigger word recognition result: when the event number prediction is 0, even if the trigger word is recognized, it will not be revealed to the user or the next stage. When the number of events is 1, but two different types of trigger words are actually predicted, the confidence of the trigger word needs to be sorted, and only the trigger word with higher confidence is selected for reservation.

[0086] In the second stage, the task of the model is to construct input with the n trigger words (and event classification results) obtained in the first stage and the original sentence, identify the entity (time, place, etc.) and argument (the victim, the perpetrator) in the sentence under the specific event type and event trigger word. Such input will be constructed n times, and after this stage, the complete facts of multiple events occurring in a sentence can be obtained.

[0087] Finally, it is worth mentioning that although the model is divided into two stages, the two stages are carried out simultaneously, that is, the parameters of the BERT layer are shared. In this way, the problem of independent modules and insufficient data utilization in the previous pipeline system is fully solved.

[0088] In some embodiments of the present application, an application for executing the above method is also provided, which has an interactive interface, as shown in Figure 8 The upper half of the interactive interface is a text input area, where you can choose to directly copy and paste the corresponding text content, or copy files in common text formats such as doc, docx, and PDF, or set a file upload control that uploads the file to be identified to the app when the control is triggered to identify the event type and quantity in the file. The lower half is the output area, which can output the identified event type, keyword, entity and argument, etc. It can be understood that the number of events in the output area does not necessarily have to be three as shown in Figure 8 At the same time, the output area is also used to prompt the user when an error is found in the identification.

[0089] In addition, in some embodiments of the present application, the text recognition method can also be applied to the following multiple scenarios.

[0090] Application scenario 1: punishment rules and complaint handling of e-commerce platforms;

[0091] When the customer complains on the e-commerce platform, the e-commerce platform obtains the complaint content to be identified; then the e-commerce platform uses the event recognition model in the machine learning model to identify the complaint content, obtains a first identification result, wherein the first identification result includes the complaint type (i.e. event type) in the text to be identified and the event trigger words corresponding to the event type such as "false propaganda" and "intentionally sending wrong goods"; the entity recognition model in the machine learning model is used to identify the complaint content again, and a second identification result is obtained, wherein the second identification result includes entity information such as "time" and "place" corresponding to each event type and argument information such as "victim" and "perpetrator"; based on the first identification result and the second identification result, the event information corresponding to each event type is determined.

[0092] For example, when a customer purchases a product A in a store of an e-commerce platform, and the product A enjoys a 14-day no reason refund. As a result, when the customer receives the express delivery, he finds that the actual efficacy of the product A is seriously inconsistent with the promotional efficacy in the store. When the customer requests for a refund, the store side always refuses the customer's request for refund. When the customer complains to the e-commerce platform, the e-commerce platform can use the above machine learning model to recognize the text of the complaint content. In the recognition, the above machine learning model can determine the penalty rules involved in the complaint content according to the keywords "serious inconsistency of promotional efficacy" and "refusal of no reason refund", and determine that the store has infringed the interests of the customer A in the process of purchasing the product A. Thus, the e-commerce platform can reasonably punish the store according to the penalty rules and the complaint content of the user.

[0093] Application scenario 2: lawyer simulates courtroom views;

[0094] Before the court, the lawyer can first prepare the case information that needs to be defended; then use the event recognition model in the machine learning model to recognize the case information to obtain a first recognition result, wherein the first recognition result includes the crime type (i.e. event type) in the to-be-recognized text and the event trigger words such as "harm" and "stealing" corresponding to the event type; use the entity recognition model in the machine learning model to recognize the case information again to obtain a second recognition result, wherein the second recognition result includes entity information such as "time" and "place" corresponding to each event type and argument information such as "victim" and "perpetrator"; determine the event information corresponding to each event type based on the first recognition result and the second recognition result.

[0095] For example, when the lawyer needs to defend the victim Xiaoming in case A, the lawyer can use the machine learning model described in this paper to analyze case A to determine which criminal behaviors are involved in case A, which articles are violated, and which rights of the victim Xiaoming are infringed by the suspect. According to the information obtained by the machine learning model above, the lawyer can simulate the views that may appear in the courtroom before the court, so as to achieve targeted defense.

[0096] Application scenario 3: prosecutor forms a plan;

[0097] The procuratorate can prepare the case content in advance before initiating a public prosecution; then an event recognition model in the machine learning model is used to recognize the case content to obtain a first recognition result, wherein the first recognition result includes the crime type (i.e., the event type) in the to-be-recognized text and the event trigger words such as "harm" and "stealing" corresponding to the event type; an entity recognition model in the machine learning model is used to recognize the case information again to obtain a second recognition result, wherein the second recognition result includes the entity information such as "time" and "place" corresponding to each event type and the argument information such as "victim" and "perpetrator"; and the event information corresponding to each event type is determined based on the first recognition result and the second recognition result.

[0098] When the procuratorate needs to initiate a public prosecution for a case, the procuratorate can first use the above machine learning model to analyze the case content. Determine which criminal behaviors in the case, which articles of law are violated by these criminal behaviors, and whether there are any statutory aggravating or mitigating circumstances of the criminal suspects and victims in the criminal behavior, so as to form a pre-plan before initiating a public prosecution, and avoid the problem that some criminal behaviors or sentencing may be omitted.

[0099] Application scenario 4: company legal affairs;

[0100] Before a company wants to develop a new service, the company's legal affairs can first prepare the service content of the new service; then an event recognition model in the machine learning model is used to recognize the service content to obtain a first recognition result, wherein the first recognition result includes the service type (i.e., the event type) in the to-be-recognized text and the event trigger words such as "merger" and "merger" corresponding to the event type; an entity recognition model in the machine learning model is used to recognize the case information again to obtain a second recognition result, wherein the second recognition result includes the entity information such as "time" and "place" corresponding to each event type and the argument information such as "acquirer" and "acquired party"; and the event information corresponding to each event type is determined based on the first recognition result and the second recognition result.

[0101] For example, when a company wants to develop a new service, the company's legal affairs can use the above machine learning model to analyze the content of the new service to determine the legal risks in the new service, i.e., which articles of law the new service may violate, so as to avoid in advance.

[0102] Application scenario 5: mediation and arbitration of relevant departments such as neighborhood committees and civil affairs bureaus;

[0103] Before the neighborhood committee mediates the disputes between neighbors, the neighborhood committee can first prepare the dispute content to be mediated; then an event recognition model in the machine learning model is used to recognize the dispute content to obtain a first recognition result, wherein the first recognition result includes the dispute type (i.e., the event type) in the text to be recognized and the event trigger words such as "disturbing the public" and "occupying a parking space" corresponding to the event type; an entity recognition model in the machine learning model is used to recognize the dispute content again to obtain a second recognition result, wherein the second recognition result includes the entity information such as "time" and "location" corresponding to each event type and the argument information such as "party whose interests are infringed" and "party infringing the interests of others"; and the event information corresponding to each event type is determined based on the first recognition result and the second recognition result.

[0104] For example, when the neighborhood committee mediates the disputes between neighbors, the neighborhood committee can use the machine learning model described above to analyze the dispute content, determine the specific events that the parties are in dispute about, and determine who the party infringing the interests of others and the party whose interests are infringed are in these events, so as to better mediate the relationship between the two parties.

[0105] Application scenario 6: checking whether the dispute focus has changed;

[0106] During the argument between the defendant and the plaintiff in court, the court staff can record the argument content in real time; then an event recognition model in the machine learning model is used to recognize the argument content to obtain a first recognition result, wherein the first recognition result includes the argument question (i.e., the event type) in the text to be recognized and the event trigger words such as "harm" and "stealing" corresponding to the argument question; an entity recognition model in the machine learning model is used to recognize the argument content again to obtain a second recognition result, wherein the second recognition result includes the entity information such as "time" and "location" corresponding to each event type and the argument information such as "victim" and "perpetrator"; and the event information corresponding to each event type is determined based on the first recognition result and the second recognition result.

[0107] For example, in a certain court trial, the judge can determine whether the lawyer of a party has blurred the dispute focus during the argument process according to the analysis result of the machine learning model, thereby improving the efficiency of the court trial.

[0108] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0109] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software on a general hardware platform as necessary, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part of the prior art that makes a contribution, and the computer software product is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk), and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the method described in each embodiment of the present application.

[0110] Embodiment 2

[0111] According to the embodiments of the present application, a text recognition method is also provided, as shown in the figure, the method comprises the following steps: Figure 3

[0112] S302, obtaining a text to be recognized;

[0113] S304, performing first recognition on the text to be recognized to obtain a first recognition result;

[0114] The first recognition result includes the event type in the text to be recognized and the event trigger word corresponding to the event type. As shown in the figure, the event trigger word corresponding to the event type "property" is "robbed", and the event trigger word corresponding to the event type "person" is "stabbed to death". Figure 6a

[0115] S306, performing second recognition on the text to be recognized to obtain a second recognition result;

[0116] The second recognition result includes the entity and argument information corresponding to each event type. Specifically, in some embodiments of the present application, the entity refers to the information of the time, place, and consequences of the case, and the argument refers to the offender and victim in the case. As shown in the figure, the consequences of the case are that the offender stabbed the victim to death, the offender of the case is "Wang Yang", and the victim of the case is "Song". Figure 6b

[0117] S308, determining the event information corresponding to each event type based on the first recognition result and the second recognition result.

[0118] ​​​In some embodiments of the present application, in order to improve the text recognition quality, before determining the event information corresponding to each event type based on the first recognition result and the second recognition result respectively, it is also necessary to first count the first quantity of event trigger words in the to-be-recognized text and the second quantity of event types in the to-be-recognized text, then compare the size of the first quantity and the second quantity, and then determine the target event trigger word by screening all event trigger words in the to-be-recognized text according to the comparison result.

[0119] Specifically, the target event trigger word is obtained by screening all event trigger words in the to-be-recognized text according to the comparison result, including: when the comparison result indicates that the first quantity is greater than the second quantity, it means that some non-event trigger words are mistakenly recognized as target trigger words, and the evaluation index of all event trigger words in the to-be-recognized text is determined, the evaluation index includes the confidence of the event trigger word, and the confidence refers to the relevance of the event trigger word and the event corresponding to the event trigger word. The confidence can be obtained by statistically analyzing the probability that a certain event trigger word in a large amount of legal text corresponds to the actual event in the text. All event trigger words in the to-be-recognized text are sorted according to the size of the evaluation index, and the target event trigger word is selected from the first quantity of event trigger words according to the sorting result. It should be noted that the number of target event trigger words selected from the first quantity of event trigger words is the same as the second quantity.

[0120] When the comparison result indicates that the first quantity is less than the second quantity, prompt information for prompting that the recognition result of the event trigger word is wrong is generated. It can be understood that when the first quantity, that is, the number of event trigger words, is less than the second quantity, that is, the number of event types, it means that there is a misrecognition situation, that is, all event trigger words are not accurately recognized or some event types are recognized incorrectly.

[0121] In some embodiments of the present application, when it is found that the first quantity is not zero and the second quantity is zero, a prompt message is sent and the following step is rejected: determining the event information corresponding to each event type based on the first recognition result and the second recognition result respectively.

[0122] In order to better understand Figure 3 the working process of the text recognition method, the working process of the text recognition method will be further explained below in combination with Figure 5 the working process diagram of the text recognition method, wherein, Figure 5 the working process diagram includes the following steps:

[0123] S502, inputting the facts in the judicial document;

[0124] S504, paragraph division;

[0125] S506, Determine whether the traversal has ended. If it has ended, proceed to step S516. If it has not ended, proceed to step S508.

[0126] S508, Event Classification and Trigger Word Recognition;

[0127] S510, process the classification results using the number of event categories;

[0128] S512, fill the question with each identified trigger word, and identify all possible entities under this category;

[0129] S514, obtain the complete one / multiple events, and then execute step S506;

[0130] S516 arranges multiple facts in chronological order of events.

[0131] like Figure 5 As shown, to address the problem of multiple events within a single sentence, each with its own corresponding entities and arguments, such as: "Wang chased Li after being robbed and tackled him to the ground"; "Wang robbed on the 12th and murdered the next day," this application designs a pipeline system for such complex events. Besides maintaining the same sentence preprocessing logic as previous systems, this system splits the deep learning model into two parts: an event classification stage and an entity and argument recognition stage. Figure 5 The first and second phases.

[0132] In the first stage, the model's task is to identify event trigger words and classify the number of events from the input statement. By identifying different types of trigger words, event classification is achieved. For example, successfully identifying the trigger word "steal" for the "property" category means the event can be classified as "property." Furthermore, the results of event count classification can be used to correct the trigger word identification results: when the predicted event count is 0, even if a trigger word is identified, it is not shown to the user or in the next stage. When the identified event count is 1, but two different types of trigger words are actually predicted, the trigger words need to be ranked by their confidence level, and only the one with the higher confidence level is retained.

[0133] In the second stage, the model's task is to construct input from the n trigger words (and event classification results) obtained in the first stage, together with the original sentence, to identify the entities (time, place, etc.) and arguments (perpetrator, victim) in the sentence under that specific event type and event trigger word. This input will be constructed n times. After this stage, the complete facts of multiple events that occurred in a sentence can be obtained.

[0134] In some embodiments of the present application, an interactive interface is also provided, as shown in Figure 8 The upper half of the interactive interface is a text input area, in which the corresponding text content can be directly copied and pasted, or a common text format file such as a doc, docx, or PDF can be copied into the text input area. The lower half of the interactive interface is an output area, which can output the recognized event types, keywords, entities, and arguments, etc. It can be understood that the number of events in the output area does not necessarily have to be three as shown in Figure 8 Meanwhile, the output area is also used to send prompt information to the user when it is found that the recognition is incorrect.

[0135] Embodiment 3

[0136] According to the embodiments of the present application, a device for implementing the above-mentioned text recognition method is also provided, as shown in Figure 4 The device comprises:

[0137] The acquisition module 40 is configured to acquire a text to be recognized. The first recognition module 42 is configured to recognize the text to be recognized by using an event recognition model in a machine learning model to obtain a first recognition result, wherein the first recognition result includes event types in the text to be recognized and event trigger words corresponding to the event types. The second recognition module 44 is configured to recognize the text to be recognized by using an entity recognition model in the machine learning model to obtain a second recognition result, wherein the second recognition result includes entities and argument information corresponding to each event type. The determination module 46 is configured to determine event information corresponding to each event type based on the first recognition result and the second recognition result, respectively.

[0138] In some embodiments of the present application, before the determination module 46 determines the event information corresponding to each event type based on the first recognition result and the second recognition result, respectively, it is also necessary to first count a first number of event trigger words in the text to be recognized and a second number of event types in the text to be recognized, then compare the first number and the second number, and then determine all event trigger words in the text to be recognized according to the comparison result to obtain target event trigger words.

[0139] Specifically, the all event trigger words in the to-be-recognized text are determined according to the comparison result to be screened to obtain the target event trigger word, including: when the comparison result indicates that the first quantity is greater than the second quantity, it is indicated that some non-event trigger words are mistakenly recognized as the target trigger words, the evaluation index of all event trigger words in the to-be-recognized text is determined, the evaluation index includes the confidence of the event trigger word, the confidence refers to the relevance of the event trigger word and the event corresponding to the event trigger word, and the confidence can be obtained by statistically analyzing the probability that the event corresponding to a certain event trigger word in a large amount of legal text conforms to the actual event in the text. The all event trigger words in the to-be-recognized text are sorted according to the size of the evaluation index; and the target event trigger word is selected from the first quantity of event trigger words according to the sorting result. It should be noted that the number of the target event trigger words selected from the first quantity of event trigger words is the same as the second quantity.

[0140] When the comparison result indicates that the first quantity is less than the second quantity, prompt information for prompting that the recognition result of the event trigger word is incorrect is generated. It can be understood that when the first quantity, that is, the number of event trigger words, is less than the second quantity of event types, it is indicated that there is a misrecognition situation, that is, all event trigger words are not accurately recognized, or some event types are misrecognized. When it is found that the first quantity is not zero and the second quantity is zero, a prompt message is sent and the following steps are rejected: determining the event information corresponding to each event type based on the first recognition result and the second recognition result, respectively.

[0141] It should be noted that the above module as a part of the device can run in the computer terminal 10 provided in embodiment one.

[0142] Embodiment 4

[0143] The embodiments of the present application can provide a computer terminal, which can be any one of the computer terminal devices in the computer terminal group. Alternatively, in the present embodiment, the above computer terminal can also be replaced by a terminal device such as a mobile terminal.

[0144] Alternatively, in the present embodiment, the above computer terminal can be located in at least one network device of a plurality of network devices of a computer network.

[0145] In this embodiment, the computer terminal described above can execute the program code for the following steps in the text recognition method: acquiring the text to be recognized; using an event recognition model in a machine learning model to recognize the text to be recognized, obtaining a first recognition result, wherein the first recognition result includes the event type in the text to be recognized and the event trigger word corresponding to the event type; using an entity recognition model in a machine learning model to recognize the text to be recognized, obtaining a second recognition result, wherein the second recognition result includes entity and argument information corresponding to each event type; and determining the event information corresponding to each event type based on the first recognition result and the second recognition result.

[0146] This application provides a text recognition scheme. It involves acquiring the text to be recognized; using an event recognition model from a machine learning model to recognize the text, obtaining a first recognition result, where the first recognition result includes the event type in the text and the event trigger word corresponding to that event type; using an entity recognition model from a machine learning model to recognize the text, obtaining a second recognition result, where the second recognition result includes entity and argument information corresponding to each event type; and determining the event information corresponding to each event type based on the first and second recognition results, thereby achieving the purpose of determining the event information corresponding to each event type. This solves the technical problem of being unable to form structured text due to the inability to handle the multiple identities of actors in complex cases, thus enabling better analysis of judicial documents, such as... Figure 7 As shown.

[0147] Those skilled in the art will understand that Figure 1 The structure shown is for illustrative purposes only. The computer terminal can also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a mobile internet device (MID), a PAD, and other terminal devices. Figure 1 This does not limit the structure of the aforementioned electronic device. For example, computer terminal 1 may also include components that are more... Figure 1 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 1 The different configurations shown.

[0148] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0149] The embodiment of the present application further provides a storage medium. Optionally, in the embodiment, the storage medium can be used to save the program code executed by the text recognition method provided in the first embodiment.

[0150] Optionally, in the embodiment, the storage medium can be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group.

[0151] Optionally, in the embodiment, the storage medium is configured to store program code for performing the following steps: obtaining to-be-recognized text; identifying the to-be-recognized text by using an event recognition model in the machine learning model to obtain a first recognition result, wherein the first recognition result includes an event type in the to-be-recognized text and an event trigger word corresponding to the event type; identifying the to-be-recognized text by using an entity recognition model in the machine learning model to obtain a second recognition result, wherein the second recognition result includes an entity and an argument corresponding to each event type; and determining event information corresponding to each event type based on the first recognition result and the second recognition result.

[0152] The serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0153] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0154] In the several embodiments of the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the unit described as the division is only a logical function division, and there can be another division way during actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection between the units can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.

[0155] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment.

[0156] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0157] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0158] The above is only the preferred embodiment of the present application, and it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.

Claims

1. A text recognition method, characterized by, The method comprises: obtaining to-be-recognized text; using an event recognition model in a machine learning model to recognize the to-be-recognized text to obtain a first recognition result, wherein the first recognition result comprises an event type in the to-be-recognized text and an event trigger word corresponding to the event type; using an entity recognition model in the machine learning model to recognize the to-be-recognized text to obtain a second recognition result, wherein the second recognition result comprises an entity and an argument corresponding to each event type; determining event information corresponding to each event type based on the first recognition result and the second recognition result respectively; wherein, before determining the event information corresponding to each event type based on the first recognition result and the second recognition result respectively, the method further comprises: counting a first number of event trigger words in the to-be-recognized text, and counting a second number of event types in the to-be-recognized text; determining a target event trigger word from all the event trigger words in the to-be-recognized text based on the first number, the second number, and an evaluation index of the to-be-recognized text.

2. The method of claim 1, wherein, Determining a target event trigger word from all the event trigger words in the to-be-recognized text based on the first number, the second number, and an evaluation index of the to-be-recognized text comprises: comparing the first number and the second number; according to the comparison result and the evaluation index, screening all the event trigger words in the to-be-recognized text to obtain the target event trigger word, wherein the evaluation index comprises a confidence of the event trigger word, and the confidence is used to represent the relevance of the event trigger word and the event corresponding to the event trigger word.

3. The method of claim 2, wherein, According to the comparison result and the evaluation index, screening all the event trigger words in the to-be-recognized text to obtain the target event trigger word comprises: when the comparison result indicates that the first number is greater than the second number, determining the evaluation index of all the event trigger words in the to-be-recognized text; sorting all the event trigger words in the to-be-recognized text according to the size of the evaluation index; and selecting the target event trigger word from the first number of event trigger words according to the sorting result.

4. The method of claim 3, wherein, The number of target event trigger words selected from the first number of event trigger words is the same as the second number.

5. The method of claim 3, wherein, The method further comprises: when the comparison result indicates that the first number is less than the second number, generating a prompt information, which is used to prompt that the recognition result of the event trigger word is incorrect.

6. The method of claim 2, wherein, The method further comprises: when the first number is a non-zero value and the second number is a zero value, the following step is rejected: determining event information corresponding to each event type based on the first recognition result and the second recognition result respectively.

7. The method of claim 1, wherein, The event recognition model is trained by the following way: The multiple groups of first sample data are input into the event recognition model for training, where each group of data in the multiple groups of first sample data includes: a first sample text, a first question template for determining an event trigger word in the first sample text, answer information corresponding to the first question template, and an event type.

8. The method of claim 1, wherein, The event recognition model is obtained by training in the following manner: The multiple groups of second sample data are input into the event recognition model for training, where each group of data in the multiple groups of second sample data includes: a second sample text, a second question template for determining an entity and an argument in the second sample text, and answer information corresponding to the second question template.

9. The method according to any one of claims 1 to 8, characterized in that, The event recognition model and the entity recognition model are the same pre-trained language model, and the event recognition model and the entity recognition model use the same model parameters.

10. A text recognition method characterized by, Comprising: obtaining a to-be-recognized text; performing first recognition on the to-be-recognized text to obtain a first recognition result, wherein the first recognition result includes an event type in the to-be-recognized text and an event trigger word corresponding to the event type; performing second recognition on the to-be-recognized text to obtain a second recognition result, wherein the second recognition result includes entity and argument information corresponding to each event type; determining event information corresponding to each event type based on the first recognition result and the second recognition result, respectively; wherein, before determining event information corresponding to each event type based on the first recognition result and the second recognition result, respectively, the method further comprises: counting a first number of event trigger words in the to-be-recognized text, and counting a second number of event types in the to-be-recognized text; determining a target event trigger word from all the event trigger words in the to-be-recognized text based on the first number, the second number, and an evaluation index of the to-be-recognized text.

11. A text recognition apparatus characterized by comprising: Comprising: an acquisition module configured to acquire a to-be-recognized text; a first recognition module configured to recognize the to-be-recognized text using an event recognition model in a machine learning model to obtain a first recognition result, wherein the first recognition result includes an event type in the to-be-recognized text and an event trigger word corresponding to the event type; a second recognition module configured to recognize the to-be-recognized text using an entity recognition model in the machine learning model to obtain a second recognition result, wherein the second recognition result includes entity and argument information corresponding to each event type; a determination module configured to determine event information corresponding to each event type based on the first recognition result and the second recognition result, respectively; wherein the determination module is further configured to count a first number of event trigger words in the to-be-recognized text, and count a second number of event types in the to-be-recognized text; and determine a target event trigger word from all the event trigger words in the to-be-recognized text based on the first number, the second number, and an evaluation index of the to-be-recognized text.

12. A non-volatile storage medium, comprising: The non-volatile storage medium includes a stored program, wherein the program, when executed, controls a device in which the non-volatile storage medium is located to perform the text recognition method of any one of claims 1 to 9.

13. A computer device, comprising: Comprise: a processor; and a memory connected with the processor, for providing the processor with instructions for processing the following processing steps: obtaining a text to be recognized; using an event recognition model in a machine learning model to recognize the text to be recognized, to obtain a first recognition result, wherein the first recognition result includes event types in the text to be recognized and event trigger words corresponding to the event types; using an entity recognition model in the machine learning model to recognize the text to be recognized, to obtain a second recognition result, wherein the second recognition result includes entities and argument information corresponding to each event type; determining event information corresponding to each event type based on the first recognition result and the second recognition result, respectively; wherein, before determining the event information corresponding to each event type based on the first recognition result and the second recognition result, respectively, it is further used to count a first number of event trigger words in the text to be recognized, and count a second number of event types in the text to be recognized, and determine a target event trigger word from all the event trigger words in the text to be recognized based on the first number, the second number and an evaluation index of the text to be recognized.

Citation Information

Patent Citations

  • Recognition method and system for event argument based on maximum entropy model

    CN104834718A

  • Multi-task interaction enhanced electronic text event extraction method

    CN112069811A