Training text generation method, model training method and entity recognition method

By identifying and expanding entities in the construction machinery text, generating similar texts, and performing automated annotation, the problem of obtaining and labeling training texts in the construction machinery field is solved, and rich training data and highly accurate entity recognition are achieved.

CN119598180APending Publication Date: 2025-03-11ZOOMLION HEAVY INDUSTRY SCIENCE AND TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411519989.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

It is difficult to obtain more training text and accurately label it in the prior art, especially in the field of engineering machinery, which leads to insufficient data and labeling difficulties in model training.

Method used

By identifying entities and categories in the construction machinery text, expanding based on entities, generating similar text, and automatically annotating and generating training text through similarity matching and verification.

Benefits of technology

It realizes automated annotation and generation of texts similar to the target text, expands the quantity and quality of training text, and improves the generalization ability of model training and the accuracy of entity recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598180A_ABST
    Figure CN119598180A_ABST
Patent Text Reader

Abstract

The invention discloses a training text generation method, a model training method and an entity recognition method, and relates to the technical field of natural language processing. The training text generation method comprises the following steps: identifying a plurality of engineering machinery entities and corresponding entity categories in a target engineering machinery text; expanding based on the plurality of engineering machinery entities to obtain a plurality of first engineering machinery texts; generating a plurality of second engineering machinery texts similar to the target engineering machinery text; identifying entities in the plurality of second engineering machinery texts and corresponding entity categories; performing similarity matching on the plurality of first engineering machinery texts and the plurality of second engineering machinery texts, and screening to obtain a third engineering machinery text of which the similarity is greater than a first similarity threshold; and verifying the third engineering machinery text, and obtaining a training text according to the third engineering machinery text passing the verification and the corresponding entity. According to the method and the device, the target engineering machinery text is automatically labeled, and enough similar texts are generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and specifically to a training text generation method, a model training method and an entity recognition method. Background Art

[0002] With the development of artificial intelligence (AI) technology, natural language processing (NLP), as an important branch of artificial intelligence, allows computer devices to accept user input in the form of natural language, and perform a series of operations such as processing and calculation through algorithms internally to simulate human understanding of natural language and return the results expected by users, so as to use computers instead of humans to process large-scale natural language information.

[0003] Due to the professionalism of the field of engineering machinery, the language model of engineering machinery has higher requirements for training texts than general language models. Annotated training texts also require experienced experts to annotate. In addition, due to the characteristics of the field, it is difficult to obtain a large amount of training texts. How to obtain more training texts and annotate the training texts more accurately to facilitate model training is the current difficulty. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a training text generation method, a model training method and an entity recognition method, so as to solve the technical problem in the prior art of how to obtain more training texts and annotate the training texts more accurately.

[0005] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a method for generating a training text, comprising:

[0006] Identify multiple engineering machinery entities and corresponding entity categories in the target engineering machinery text;

[0007] Expand based on multiple engineering machinery entities to obtain multiple first engineering machinery texts;

[0008] generating a plurality of second engineering machinery texts similar to the target engineering machinery text;

[0009] Identify engineering machinery entities and corresponding entity categories in a plurality of second engineering machinery texts;

[0010] Performing similarity matching on the plurality of first engineering machinery texts and the plurality of second engineering machinery texts, and screening out third engineering machinery texts whose similarity is greater than a first similarity threshold;

[0011] The third engineering machinery text is verified, and a training text is obtained according to the verified third engineering machinery text and the corresponding engineering machinery entity, and the target engineering machinery text and the corresponding engineering machinery entity.

[0012] In the embodiment of the present application, expansion is performed based on multiple engineering machinery entities to obtain multiple first engineering machinery texts, including:

[0013] Inputting multiple engineering machinery entities into an entity similarity matching model according to a target order to obtain multiple first similar entities that match each engineering machinery entity, wherein the target order is the arrangement order of the multiple engineering machinery entities in the target engineering machinery text;

[0014] Combining the first target entity and the first similar entity corresponding to the second target entity according to the target order to obtain a first initial engineering machinery text, wherein the first target entity is at least one of the plurality of engineering machinery entities, and the second target entity is an entity of the plurality of engineering machinery entities except the first target entity;

[0015] The first initial engineering machinery text is screened for text compliance to obtain a plurality of first engineering machinery texts.

[0016] In the embodiment of the present application, generating a plurality of second engineering machinery texts similar to the target engineering machinery text includes:

[0017] Inputting the target engineering machinery text into the engineering machinery text generation model to obtain a second initial engineering machinery text similar to the target engineering machinery text;

[0018] The similarity between the second initial engineering machinery text and the target engineering machinery text is calculated using a text similarity model, and a preset number of second engineering machinery texts with the greatest similarity are screened out.

[0019] In an embodiment of the present application, the method further includes:

[0020] Perform data cleaning on the target engineering machinery text;

[0021] Identify multiple engineering machinery entities and their corresponding entity categories in the target engineering machinery text, including:

[0022] Identify multiple engineering machinery entities and corresponding entity categories in the target engineering machinery text after data cleaning;

[0023] Generating a plurality of second engineering machinery texts similar to the target engineering machinery text, including:

[0024] A plurality of second engineering machinery texts similar to the target engineering machinery text after data cleaning are generated.

[0025] In the embodiment of the present application, the third engineering machinery text is verified, and a training text is obtained according to the verified third engineering machinery text and the corresponding engineering machinery entity, and the target engineering machinery text and the corresponding engineering machinery entity, including:

[0026] Performing similarity matching between the engineering machinery entity in the third engineering machinery text and the engineering machinery entity in the target engineering machinery text based on the corresponding entity types, and screening out a fourth engineering machinery text having a similarity greater than a second similarity threshold;

[0027] The target engineering machinery text and the corresponding multiple physical engineering machinery entities, and the fourth engineering machinery text and the corresponding multiple engineering machinery entities are respectively combined to obtain training texts.

[0028] In the embodiment of the present application, the third engineering machinery text is verified, and a training text is obtained according to the verified third engineering machinery text and the corresponding engineering machinery entity, and the target engineering machinery text and the corresponding engineering machinery entity, including:

[0029] Combining the target engineering machinery text and the third engineering machinery text with the corresponding multiple engineering machinery entities respectively to obtain a text set;

[0030] Performing similarity matching between the engineering machinery entity in the third engineering machinery text and the engineering machinery entity in the target engineering machinery text based on the corresponding entity types, and screening out a fourth engineering machinery text having a similarity greater than a second similarity threshold;

[0031] The target engineering machinery text and the corresponding multiple physical engineering machinery entities, as well as the fourth engineering machinery text and the corresponding multiple physical engineering machinery entities are screened from the text set to obtain training texts.

[0032] The second aspect of the present application provides a model training method, comprising:

[0033] The training text is input into a preset model for training to obtain an engineering machinery entity recognition model, wherein the training text is obtained according to the training text generation method of the first aspect above.

[0034] The third aspect of the present application provides an entity recognition method, comprising:

[0035] The engineering machinery text to be identified is input into the engineering machinery entity recognition model to obtain the engineering machinery entities and entity types of the engineering machinery entities in the engineering machinery text to be identified, wherein the engineering machinery entity recognition model is obtained according to the model training method of the second aspect mentioned above.

[0036] A fourth aspect of the present application provides a computing device, including:

[0037] a memory configured to store instructions;

[0038] A processor is configured to call instructions from a memory and implement the method according to the first aspect, the second aspect or the third aspect when executing the instructions.

[0039] A fifth aspect of the present application provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute a method according to the first aspect, the second aspect, or the third aspect above.

[0040] Through the above technical solution, the training text generation method provided in the embodiment of the present application combines engineering machinery entities with text generation and similarity calculation, and while annotating the target engineering machinery text, it also obtains text similar to the target engineering machinery text, which not only realizes the automatic annotation of the target engineering machinery text, but also can generate similar texts to ensure that the model training has a sufficient number. The model training method provided in the embodiment of the present application, because the training text obtained by the above training text generation method is adopted, the training text has annotations and the number of texts is richer, which can improve the generalization ability of the obtained engineering machinery entity recognition model. The entity recognition method provided in the embodiment of the present application, because the engineering machinery entity recognition model obtained by the above model training method is adopted, can improve the accuracy of the engineering machinery entities and the entity types of engineering machinery entities in the engineering machinery text to be recognized.

[0041] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:

[0043] Figure 1 A schematic diagram of a flow chart of a method for generating training text according to an embodiment of the present application is schematically shown;

[0044] Figure 2 A schematic diagram of a process flow of a model training method according to an embodiment of the present application is schematically shown;

[0045] Figure 3 A schematic diagram of a process flow of an entity recognition method according to an embodiment of the present application is shown;

[0046] Figure 4 A schematic diagram of the structure of a computing device according to an embodiment of the present application is shown schematically. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0048] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0049] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0050] Figure 1 The flowchart of a method for generating training text according to an embodiment of the present application is schematically shown. Figure 1 As shown, an embodiment of the present application provides a method for generating a training text, which may include the following steps.

[0051] Step 110: Identify multiple engineering machinery entities and corresponding entity categories in the target engineering machinery text.

[0052] In an embodiment of the present application, an engineering machinery entity recognition model can be used to identify the target engineering machinery text, thereby obtaining multiple entities in the target engineering machinery text and corresponding entity categories. The engineering machinery entities obtained by engineering machinery text recognition refer to nouns or verbs related to engineering machinery, which have certain practical meanings, and words that have nothing to do with engineering machinery will not be recognized. The entity category is determined based on the engineering machinery entity. Schematically, the target engineering machinery text can be "Why can't the boom of the pump truck move?" After recognition, the engineering machinery entities obtained include "pump truck", "boom" and "cannot move". The entity categories of the engineering machinery entities "pump truck" and "boom" are parts, and the entity category of the engineering machinery entity "cannot move" is fault.

[0053] It can be understood that the engineering machinery entity recognition model can be set according to actual needs. For example, the UIE (Unified Structure Generation for Universal Information Extraction) model can be used, or the RoBERTa (Robustly Optimized BERTPretraining Approach) model can be used. The embodiments of the present application are not limited to this.

[0054] Step 120: Expand based on multiple engineering machinery entities to obtain multiple first engineering machinery texts.

[0055] In the embodiment of the present application, based on the multiple engineering machinery entities obtained in step 110, expansion can be performed based on the multiple engineering machinery entities to obtain multiple first engineering machinery texts. It is understandable that the expansion method can be synonym expansion or neural network implementation, which is not limited in the embodiment of the present application.

[0056] In an optional implementation, step 120 includes:

[0057] Step 121: inputting a plurality of engineering machinery entities into an entity similarity matching model according to a target order to obtain a plurality of first similar entities respectively matching each engineering machinery entity, wherein the target order is an arrangement order of the plurality of engineering machinery entities in the target engineering machinery text;

[0058] Step 122: combining the first target entity and the first similar entity corresponding to the second target entity according to the target order to obtain a first initial engineering machinery text, wherein the first target entity is at least one of the plurality of engineering machinery entities, and the second target entity is an entity of the plurality of engineering machinery entities other than the first target entity;

[0059] Step 123: Perform text compliance screening on the first initial engineering machinery text to obtain a first engineering machinery text.

[0060] Specifically, in the embodiment of the present application, the multiple engineering machinery entities obtained in step 110 are first input into the entity similarity matching model according to the arrangement order in the target engineering machinery text, so as to obtain multiple first similar entities that match each engineering machinery entity. Schematically, "pump truck", "arm", and "cannot move" are input into the entity similarity matching model in sequence, and the first similar entity "concrete conveying machinery" corresponding to "pump truck" can be obtained, and the first similar entities "one arm", "big arm" and "two arms" corresponding to "arm" can be obtained, and the first similar entities "cannot move" and "cannot move" corresponding to "cannot move" can be obtained.

[0061] Then, at least one of the multiple engineering machinery entities in step 110 is combined with the first similar entities corresponding to other engineering machinery entities according to the target order to obtain the first initial engineering machinery text. Schematically, the first similar entity "big arm" corresponding to "arm" and the first similar entity "cannot move" corresponding to "cannot move" in the engineering machinery entity are combined to obtain "the big arm of the pump truck cannot move"; the first similar entity "cannot move" corresponding to "arm" and "immovable" in the engineering machinery entity are combined to obtain "the arm of the pump truck cannot move".

[0062] It should be noted that in step 121 and step 122, the entities need to maintain the same order, that is, the arrangement order in the target engineering machinery text, so that the composed text meets the text requirements.

[0063] For the first initial engineering machinery text, text compliance screening is required. Text compliance screening refers to whether the text meets the requirements of human grammatical expression. In some cases, when there is too much mixed impurity information in the engineering machinery text, there will be too few entities to be combined into a complete sentence. Schematically, the target engineering machinery text is "Pump truck information transmission failed". After recognition in step 110, the possible results may be "pump truck" and "failure". The text obtained by expanding these two entities may be meaningless. Therefore, in order to avoid this situation, text compliance screening is required for judgment. It can be understood that text compliance screening can be achieved through text semantic detection. Schematically, the BERT (Bidirectional Encoder Representation from Transformers) model can be used.

[0064] Step 130: Generate a plurality of second engineering machinery texts similar to the target engineering machinery text.

[0065] In the embodiment of the present application, not only the target engineering machinery text is expanded based on the entity, but also a plurality of second engineering machinery texts similar to the target engineering machinery text are directly generated. Schematically, a neural network can be used for generation.

[0066] In an optional implementation, step 130 includes:

[0067] Step 131: inputting the target engineering machinery text into an engineering machinery text generation model to obtain a second initial engineering machinery text similar to the target engineering machinery text;

[0068] Step 132: Calculate the similarity between the second initial engineering machinery text and the target engineering machinery text using a text similarity model, and select a preset number of second engineering machinery texts with the greatest similarity.

[0069] Specifically, in the embodiment of the present application, the second initial engineering machinery text similar to the target engineering machinery text is generated using the engineering machinery text generation model. It is understandable that the engineering machinery text generation model can be set according to actual needs. For example, it can be implemented using a transformer-based encoder architecture, or a GPT (Generative Pre-Trained Transformer) model or a Claude model. The embodiment of the present application does not limit this.

[0070] Schematically, the engineering machinery text generation model can generate five original engineering machinery texts at a time, and the sum of the probabilities of these five original engineering machinery texts is equal to 1. From these five second initial engineering machinery texts, the one with the highest probability is selected as the second initial engineering machinery text. Repeat the generation ten times to obtain ten second initial engineering machinery texts.

[0071] Then, the text similarity model is used to calculate the similarity between the second initial engineering machinery text and the target engineering machinery text. Schematically, the ten second initial engineering machinery texts obtained above can be sorted based on the similarity calculation results to select a preset number of second engineering machinery texts with the greatest similarity.

[0072] It is understandable that the preset number can be set according to actual needs, for example, it can be 5; the text similarity model can also be set according to actual needs, for example, using a BERT-based twin network, which is not limited in the embodiments of the present application.

[0073] Step 140: Identify entities and corresponding entity categories in a plurality of second engineering machinery texts.

[0074] The entity recognition of the plurality of second engineering machinery texts generated in step 130 may be performed using a method similar to that in step 110 , which will not be described in detail here.

[0075] Step 150: performing similarity matching on the plurality of first engineering machinery texts and the plurality of second engineering machinery texts, and screening out third engineering machinery texts having a similarity greater than a first similarity threshold.

[0076] Schematically, three first engineering machinery texts A1, A2, A3 are obtained in step 120, and five second engineering machinery texts B1, B2, B3, B4, B5 are obtained in step 140. Then, the three first engineering machinery texts are matched with the five second engineering machinery texts by similarity, that is, 15 similarity matches are required to screen out the third engineering machinery text whose similarity is greater than the first similarity threshold. The similarity calculation can be implemented in a similar manner to step 132, so as to perform similarity matching.

[0077] It is understandable that the first similarity threshold can be set according to actual needs, for example, it can be 0.9, and this embodiment of the present application does not limit this.

[0078] It should be noted that as long as the similarity between one of the first engineering machinery texts and any one of the second engineering machinery texts is greater than the first similarity threshold, the first engineering machinery text and the second engineering machinery text need to be retained. Schematically, if the similarity between the first engineering machinery text A1 and the second engineering machinery text B1 is greater than 0.9, but the similarities between the first engineering machinery text A1 and the other second engineering machinery texts B2, B3, B4, and B5 are not greater than 0.9, the first engineering machinery text A1 still needs to be screened and retained.

[0079] Step 160: verify the third engineering machinery text, and obtain a training text based on the verified third engineering machinery text and the corresponding engineering machinery entity, as well as the target engineering machinery text and the corresponding engineering machinery entity.

[0080] Specifically, the third engineering machinery text obtained in step 150 needs to be verified. Illustratively, verification can be performed by similarity matching, or other methods can be used, which is not limited in the embodiments of the present application. Based on the verified third engineering machinery text and the corresponding engineering machinery entity, as well as the target engineering machinery text and the corresponding engineering machinery entity, a training text can be obtained. That is, the entities in both the target engineering machinery text and the third engineering machinery text are identified, and annotation is achieved. At the same time, based on the target engineering machinery text, the third engineering machinery text that meets the requirements is expanded to obtain a richer training text. Furthermore, even if the target engineering machinery text itself does not meet the text specifications, after being processed by the embodiments of the present application, some similar fourth engineering machinery texts can still be obtained, thereby ensuring a sufficient number of training texts.

[0081] Schematically, the target engineering machinery text "Why can't the pump truck arm move?" is combined with the engineering machinery entities "pump truck", "arm" and "cannot move" to obtain: {"text":"one arm can't move","part":"one arm","error":"cannot move"}. Among them, text represents the target engineering machinery text, part represents the entity type is a component, and error represents the entity type is a fault.

[0082] The embodiment of the present application provides two implementation forms of step 160, which will be described in detail below.

[0083] In an optional implementation, step 160 includes:

[0084] Performing similarity matching between the engineering machinery entity in the third engineering machinery text and the engineering machinery entity in the target engineering machinery text based on the corresponding entity types, and screening out a fourth engineering machinery text having a similarity greater than a second similarity threshold;

[0085] The target engineering machinery text and the corresponding multiple physical engineering machinery entities, and the fourth engineering machinery text and the corresponding multiple engineering machinery entities are respectively combined to obtain training texts.

[0086] Specifically, the engineering machinery entities in the third engineering machinery text and the engineering machinery entities in the target engineering machinery text can be matched based on the corresponding entity types, sorted based on the calculation results of the similarity, and the fourth engineering machinery text with a similarity greater than the second similarity threshold can be selected. In other words, entities corresponding to the same entity type are matched by similarity, and the fourth engineering machinery text that is more similar to the target engineering machinery text is selected from the third engineering machinery text.

[0087] It is understandable that the second similarity threshold can be set according to actual needs, for example, it can be 0.9, and this embodiment of the present application does not limit this.

[0088] Then, the target engineering machinery text and the corresponding multiple physical engineering machinery entities, and the fourth engineering machinery text and the corresponding multiple engineering machinery entities are combined respectively to obtain training texts.

[0089] That is, in this implementation, similarity screening is performed first, and then text combination is performed to obtain training text.

[0090] In an optional implementation, step 160 includes:

[0091] Combining the target engineering machinery text and the third engineering machinery text with the corresponding multiple engineering machinery entities respectively to obtain a text set;

[0092] Performing similarity matching between the engineering machinery entity in the third engineering machinery text and the engineering machinery entity in the target engineering machinery text based on the corresponding entity types, and screening out a fourth engineering machinery text having a similarity greater than a second similarity threshold;

[0093] The target engineering machinery text and the corresponding multiple physical engineering machinery entities, as well as the fourth engineering machinery text and the corresponding multiple physical engineering machinery entities are screened from the text set to obtain training texts.

[0094] Specifically, the target engineering machinery text and the third engineering machinery text are first combined with the corresponding multiple engineering machinery entities to obtain a text set. Then, the engineering machinery entities in the third engineering machinery text and the engineering machinery entities in the target engineering machinery text are matched based on the corresponding entity types, sorted based on the calculation results of the similarity, and the fourth engineering machinery text with a similarity greater than the second similarity threshold is selected; finally, the target engineering machinery text and the corresponding multiple physical engineering machinery entities, as well as the fourth engineering machinery text and the corresponding multiple physical engineering machinery entities are selected from the text set to obtain a training text.

[0095] That is, in this implementation, text combination is performed first, then similarity screening is performed, and finally engineering machinery texts that meet the requirements are screened out from the text collection to obtain training texts.

[0096] In an optional implementation, the method further includes:

[0097] Perform data cleaning on the target engineering machinery text;

[0098] Step 110 includes:

[0099] Identify multiple engineering machinery entities and corresponding entity categories in the target engineering machinery text after data cleaning;

[0100] Step 130 includes:

[0101] A plurality of second engineering machinery texts similar to the target engineering machinery text after data cleaning are generated.

[0102] Specifically, data cleaning refers to processing and screening raw data to ensure the accuracy, completeness and consistency of the data. It is part of data preprocessing, including steps such as processing missing values, outliers, converting data formats, and deleting duplicate values, aiming to improve the quality and reliability of data and reduce errors and deviations in data analysis and visualization. In the embodiment of the present application, the target engineering machinery text will contain a lot of non-standard content, such as spaces, special characters, etc. Therefore, it is necessary to perform data cleaning on the target engineering machinery text, so as to standardize the content of the target engineering machinery text and facilitate subsequent model processing. Therefore, the target engineering machinery text after data cleaning is used for processing in the subsequent steps of the embodiment of the present application.

[0103] The training text generation method provided in the embodiment of the present application combines engineering machinery entities with text generation and similarity calculation. While annotating the target engineering machinery text, it also obtains text similar to the target engineering machinery text. It not only realizes the automatic annotation of the target engineering machinery text, but also generates similar text to ensure that the model training has a sufficient number.

[0104] Furthermore, the embodiment of the present application also provides a model training method, comprising:

[0105] Step 210: Input the training text into a preset model for training to obtain an engineering machinery entity recognition model, wherein the training text is obtained according to the above-mentioned training text generation method.

[0106] See also Figure 2 , Figure 2 The following schematically shows a flow chart of a model training method according to an embodiment of the present application. Figure 2 As shown, the model training method provided in the embodiment of the present application adopts the training text obtained by the above-mentioned training text generation method. The training text has annotations and the number of texts is richer, which can improve the generalization ability of the obtained engineering machinery entity recognition model.

[0107] Furthermore, the embodiment of the present application also provides an entity recognition method, comprising:

[0108] Step 310: Input the engineering machinery text to be identified into the engineering machinery entity recognition model to obtain the engineering machinery entities and entity types of the engineering machinery entities in the engineering machinery text to be identified, wherein the engineering machinery entity recognition model is obtained according to the above-mentioned model training method.

[0109] See also Figure 3 , Figure 3 The following schematically shows a flow chart of an entity recognition method according to an embodiment of the present application. Figure 3 As shown, the entity recognition method provided in the embodiment of the present application, because it adopts the engineering machinery entity recognition model obtained by the above-mentioned model training method, can improve the accuracy of the engineering machinery entities and the entity types of the engineering machinery entities in the identified engineering machinery text to be identified.

[0110] Figure 4 The structure block diagram of a computing device according to an embodiment of the present application is schematically shown. Figure 4 As shown, an embodiment of the present application provides a computing device, which may include:

[0111] Memory 410, configured to store instructions;

[0112] The processor 420 is configured to call instructions from the memory 410 and implement the above-mentioned training text generation method, model training method or entity recognition method when executing the instructions.

[0113] The computing device provided in the embodiment of the present application can implement each process of the training text generation method or the model training method or the entity recognition method in the method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0114] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned training text generation method, model training method, or entity recognition method.

[0115] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0116] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0117] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0118] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0119] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0120] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0121] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0122] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0123] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for generating training text, characterized in that: include: Identify multiple engineering machinery entities and corresponding entity categories in the target engineering machinery text; Expanding based on the multiple engineering machinery entities to obtain multiple first engineering machinery texts; generating a plurality of second engineering machinery texts similar to the target engineering machinery text; Identifying engineering machinery entities and corresponding entity categories in the plurality of second engineering machinery texts; Performing similarity matching on the plurality of first engineering machinery texts and the plurality of second engineering machinery texts, and screening out third engineering machinery texts whose similarity is greater than a first similarity threshold; The third engineering machinery text is verified, and the training text is obtained according to the verified third engineering machinery text and the corresponding engineering machinery entity, and the target engineering machinery text and the corresponding engineering machinery entity.

2. The method according to claim 1, characterized in that The expansion based on the multiple engineering machinery entities to obtain multiple first engineering machinery texts includes: Inputting the plurality of engineering machinery entities into an entity similarity matching model according to a target order to obtain a plurality of first similar entities respectively matching each of the engineering machinery entities, wherein the target order is the arrangement order of the plurality of engineering machinery entities in the target engineering machinery text; Combining the first target entity and the first similar entities corresponding to the second target entity according to the target order to obtain a first initial engineering machinery text, wherein the first target entity is at least one of the multiple engineering machinery entities, and the second target entity is an entity among the multiple engineering machinery entities except the first target entity; The first initial engineering machinery text is screened for text compliance to obtain the plurality of first engineering machinery texts.

3. The method according to claim 1, characterized in that: The generating of a plurality of second engineering machinery texts similar to the target engineering machinery text comprises: Inputting the target engineering machinery text into an engineering machinery text generation model to obtain a second initial engineering machinery text similar to the target engineering machinery text; The similarity between the second initial engineering machinery text and the target engineering machinery text is calculated using a text similarity model, and a preset number of second engineering machinery texts with the greatest similarity are obtained by screening.

4. The method according to claim 1, characterized in that: The method further comprises: Perform data cleaning on the target engineering machinery text; The identifying of multiple engineering machinery entities and corresponding entity categories in the target engineering machinery text includes: Identify multiple engineering machinery entities and corresponding entity categories in the target engineering machinery text after data cleaning; The generating of a plurality of second engineering machinery texts similar to the target engineering machinery text comprises: Generate a plurality of second engineering machinery texts similar to the target engineering machinery text after data cleaning.

5. The method according to claim 1, characterized in that The verifying the third engineering machinery text and obtaining the training text according to the verified third engineering machinery text and the corresponding engineering machinery entity, and the target engineering machinery text and the corresponding engineering machinery entity, includes: Performing similarity matching between the engineering machinery entity in the third engineering machinery text and the engineering machinery entity in the target engineering machinery text based on corresponding entity types, and screening out a fourth engineering machinery text having a similarity greater than a second similarity threshold; The target engineering machinery text and the corresponding multiple physical engineering machinery entities, and the fourth engineering machinery text and the corresponding multiple engineering machinery entities are respectively combined to obtain the training text.

6. The method according to claim 1, characterized in that The verifying the third engineering machinery text and obtaining the training text according to the verified third engineering machinery text and the corresponding engineering machinery entity, and the target engineering machinery text and the corresponding engineering machinery entity, includes: Combining the target engineering machinery text and the third engineering machinery text with corresponding multiple engineering machinery entities respectively to obtain a text set; Performing similarity matching between the engineering machinery entity in the third engineering machinery text and the engineering machinery entity in the target engineering machinery text based on corresponding entity types, and screening out a fourth engineering machinery text having a similarity greater than a second similarity threshold; The target engineering machinery text and the corresponding multiple physical engineering machinery entities, as well as the fourth engineering machinery text and the corresponding multiple physical engineering machinery entities are screened from the text set to obtain the training text.

7. A model training method, characterized in that: include: The training text is input into a preset model for training to obtain an engineering machinery entity recognition model, wherein the training text is obtained according to the training text generation method according to any one of claims 1 to 6.

8. An entity recognition method, characterized in that: include: The engineering machinery text to be identified is input into an engineering machinery entity recognition model to obtain engineering machinery entities in the engineering machinery text to be identified and entity types of the engineering machinery entities, wherein the engineering machinery entity recognition model is obtained according to the model training method according to claim 7.

9. A computing device, characterized in that include: a memory configured to store instructions; A processor is configured to call the instructions from the memory and implement the method according to any one of claims 1 to 8 when executing the instructions.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions, which are used to enable a machine to execute the method according to any one of claims 1 to 8.