Domain model training method, device, equipment and storage medium

By annotating and selecting natural language processing algorithms for domain data, the problem of high difficulty in customizing natural language processing models in the prior art is solved, and convenient natural language processing model generation and application are realized.

CN113741885BActive Publication Date: 2025-02-18ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

It is difficult for the existing technology to achieve convenient customization of natural language processing models, and developers need to study and write algorithms themselves, which makes it difficult to develop.

Method used

Provide a training method for domain models, including annotating domain data, selecting natural language processing algorithms, and using labeled data training algorithms to generate domain models.

Benefits of technology

Through this method, users can conveniently customize natural language processing models in various fields, improve data acquisition efficiency and processing accuracy, and reduce development difficulty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113741885B_ABST
    Figure CN113741885B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method, device, equipment and storage medium for training a domain model, so as to more conveniently process natural languages ​​in various fields. The method comprises: labeling the data of the domain to obtain the labeled data; selecting a natural language processing algorithm according to the domain; and training the natural language processing algorithm using the labeled data to obtain a domain model of the trained domain. The processing efficiency can be improved, and the accuracy of the domain model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for training a domain model, an electronic device, and a storage medium. Background Art

[0002] With the rapid development of technologies such as artificial intelligence, cloud technology, and big data, the demand for natural language processing is increasing in various industries.

[0003] Based on natural language processing technology, it is necessary to customize the processing model for specific fields and conduct analysis through the processing model. However, the current models often require developers to independently study various algorithms of natural language processing technology, and then write programs according to the algorithms to develop models, which places high demands on developers and is difficult to implement. Summary of the invention

[0004] The embodiments of the present application provide a method for training a domain model to more conveniently process natural languages ​​in various fields.

[0005] Correspondingly, an embodiment of the present application also provides a domain model training device, an electronic device and a storage medium to ensure the implementation and application of the above method.

[0006] In order to solve the above problems, an embodiment of the present application discloses a method for training a domain model, which includes: labeling domain data to obtain labeled data; selecting a natural language processing algorithm based on the domain; and training the natural language processing algorithm using the labeled data to obtain a trained domain model of the domain.

[0007] An embodiment of the present application also discloses a domain model training device, including: a labeling module, used to label domain data to obtain labeled data; an algorithm selection module, used to select a natural language processing algorithm according to the domain; a training module, used to train the natural language processing algorithm using the labeled data to obtain a trained domain model of the domain.

[0008] An embodiment of the present application further discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes one or more methods described in the embodiments of the present application.

[0009] The embodiments of the present application also disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes one or more methods described in the embodiments of the present application.

[0010] Compared with the prior art, the embodiments of the present application have the following advantages:

[0011] In an embodiment of the present application, data in a field can be labeled to obtain labeled data, thereby facilitating customization of training data in various fields and improving the efficiency of acquiring training data. A natural language processing algorithm can also be selected according to the field, so that users do not need to program themselves to implement the algorithm, thereby improving processing efficiency. The labeled data can then be used to train the natural language processing algorithm to obtain a trained domain model of the field, thereby improving the accuracy of natural language processing in the corresponding field. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a schematic diagram of an example of a domain model customization system in an embodiment of the present application;

[0013] Figure 2 is a schematic diagram of a page example of an embodiment of the present application;

[0014] Figure 3 is a flowchart of steps of an embodiment of a data processing method of the present application;

[0015] Figure 4 is a schematic diagram of the architecture of a data processing system according to an embodiment of the present application;

[0016] Figure 5 is a flowchart of another data processing method embodiment of the present application;

[0017] Figure 6 It is a flowchart of a process embodiment of a domain model-based processing method of the present application;

[0018] Figure 7 It is a structural block diagram of an embodiment of a training device for a domain model of the present application;

[0019] Figure 8 is a structural block diagram of an embodiment of a data processing device of the present application;

[0020] Fig. 9 is a structural block diagram of an optional embodiment of a data processing device of the present application;

[0021] Fig.10 It is a structural block diagram of an embodiment of a processing device based on a domain model of the present application;

[0022] Fig.11 It is a schematic diagram of the structure of a device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0024] The embodiments of the present application can be applied to the field of natural language processing, and can assist users in customizing the domain models required for natural language processing in various fields. The domain model can also be called a natural language processor, a natural language processing model in a field, etc. Among them, the domain customization system in the embodiments of the present application can provide various algorithms required for natural language processing corresponding to the field, so that users do not need to program themselves to implement the algorithm. Users can select the algorithm required by the field to customize the domain model of the field. It can also provide a labeling page for users to label data, so as to facilitate users to customize the data in the field as training data, improve the efficiency of obtaining training data, and use the labeled data to train the natural language processing algorithm to obtain the trained domain model of the field. The domain model of the field can be used to process the data in the field later, and the processing results obtained can also be refluxed to train the domain model of the field to improve the accuracy of the domain model.

[0025] In an embodiment of the present application, the domain model is applied to a natural language processing scenario in a corresponding field, such as a translation scenario. The translation field is subdivided based on the translation scenario, such as the cross-border e-commerce translation field, the social network translation field, etc. Taking the cross-border e-commerce translation field as an example, the domain model can translate various information such as product information and address information on the cross-border e-commerce website.

[0026] Among them, natural language processing (NLP) is an important direction in the fields of computer science and artificial intelligence. Its research can realize various theories and methods for effective communication between people and computers using natural language. Natural language processing can be understood as a science that integrates linguistics, computer science, and mathematics. Based on natural language processing algorithms and model algorithms, the domain model of the corresponding field can be obtained through the labeled data of various fields. The domain model is a mathematical model. The mathematical model is a scientific or engineering model constructed using mathematical logic methods and mathematical language. The mathematical model is a mathematical structure that is generally or approximately expressed using mathematical language based on the characteristics or quantitative dependencies of a certain system of things. This mathematical structure is a pure relational structure of a certain system portrayed with the help of mathematical symbols. The mathematical model can be one or a group of algebraic equations, differential equations, difference equations, integral equations or statistical equations and their combinations, which quantitatively or qualitatively describe the mutual relationship or causal relationship between the variables of the system through these equations. In addition to mathematical models described by equations, there are also models described by other mathematical tools, such as algebra, geometry, topology, mathematical logic, etc. Mathematical models describe the behavior and characteristics of a system rather than its actual structure.

[0027] like Figure 1 A schematic diagram of an example of a process for a domain customization system is shown.

[0028] Step 102: annotate the data in the field to obtain annotated data.

[0029] After determining the field to be processed, the data in the field can be obtained and labeled to obtain the labeled data. Data labeling can be achieved in many ways, such as automatic labeling through some algorithms.

[0030] In the embodiments of the present application, data in various fields can be processed based on natural language. The processing of natural language information often requires the identification of some named entities. Named entities can refer to things identified by proper nouns (names). A named entity generally represents a unique individual of a specific thing, including names of people, places, etc. Named-Entity Recognition (NER) refers to the identification of entities with specific meanings in text, which can include names of people, places, names of organizations, proper nouns, etc., and can also include text such as time, quantity, currency, and proportional values.

[0031] In an optional embodiment of the present application, data can be annotated based on an annotation page. Among them, an annotation page can be obtained; and data of the field can be imported into the annotation page. The embodiment of the present application can provide an annotation page to assist users in annotating data. The annotation page refers to a page that provides information annotation capabilities. Data of the field that needs to be annotated can be imported into the page, so that the corresponding annotation page can be displayed and the annotation function for the data of the imported field can be provided. For example, for cross-border e-commerce websites and web pages of e-commerce websites, web page information can be imported into the annotation page to display the web page.

[0032] In another optional embodiment, the labeling of the data in the field includes: displaying the data on the labeling page; adding labeling information to the data on the labeling page, and the labeling information includes: entity type and entity information.

[0033] In the annotation page, select the information that needs to be annotated, such as framing the information that needs to be annotated, etc. The corresponding auxiliary annotation box is displayed based on the user's selection. The user can set the entity type of the selected annotation information in the auxiliary annotation box, and the selected annotation information is the entity information of the entity type, and a piece of annotation information consisting of the entity information and the entity type is obtained. One or more annotation information can be annotated in an information annotation page. For example, for cross-border e-commerce websites and web pages of e-commerce websites, you can annotate the product name, product category, place of shipment, guarantee information, size information, and various product information such as the material, pattern, style, etc. of the product, so as to obtain one or more annotation information.

[0034] like Figure 2 In the example of the annotation page shown, the initial annotation page can be opened as follows before data is imported. Figure 2 The first page example in the example, after importing the resume Figure 2 As shown in the second page example in the figure, after marking on the page, you can Figure 3 As shown in the example of the third page in the resume, mark the entity types such as name, gender, ethnicity, date of birth, native place, graduation school, education, time period, resume link, and the corresponding entity information in the resume.

[0035] In an optional embodiment, the annotation information is displayed in the annotation information area according to the entity type. A triggering of an edit control of a specified entity type in the annotation information area and a selection of target information in the information display area are received; and the target information is determined to be entity information of the specified entity type.

[0036] Edit controls can be configured for each entity type, and can be triggered, such as Figure 1By clicking the add annotation control and then selecting corresponding target information in the information display area, the target information can be automatically added to the annotation information area as entity information of the entity type, as a record of entity information under the entity type.

[0037] After completing the annotation of a data, data of the same type can be automatically annotated based on the annotation information of the data. In other examples, the user can also check the automatically generated annotation information based on the annotation page, so as to add, modify, or delete the corresponding annotation information.

[0038] In some other embodiments, the target information may be determined as entity information of the specified entity type based on selection of the specified entity type and target information in the annotation information area.

[0039] The user can select the information to be annotated in the annotation page, such as selecting the target information by dragging, clicking, etc. The target information can be various information such as words, phrases, sentences, URLs, etc., which can be determined according to the type of information required for annotation of the data. After determining the selected target information, the target information can be used as entity information, and then the entity type of the entity information can be set, such as by triggering the setting box by right-clicking, or directly displaying the corresponding auxiliary setting box, etc., so as to set the entity type of the entity information, and obtain a piece of annotation information consisting of the entity information and the entity type.

[0040] Among them, an auxiliary annotation box can be displayed next to the target information, and then the user can set the entity type in the auxiliary annotation box. In some examples, the user can enter the entity type, and in other examples, some possible entity type options can be provided for the user to choose, so as to determine the entity type to which the target information belongs based on the selection, and obtain the corresponding entity type and entity information. Figure 2 In the example of the annotation page shown, the initial annotation page can be opened as follows before data is imported. Figure 2 The first page example in the example, after importing the resume Figure 2 As shown in the second page example in the figure, after marking on the page, you can Figure 3 As shown in the example of the third page in the resume, mark the entity types such as name, gender, ethnicity, date of birth, native place, graduation school, education, time period, resume link, and the corresponding entity information in the resume.

[0041] Step 104, selecting a natural language processing algorithm according to the domain.

[0042] After completing the data annotation, you can select the natural language processing algorithm corresponding to the field. The field customization system can provide an algorithm template for the natural language algorithm. The NLP algorithm provided based on the algorithm template can perform various processing such as text extraction, analysis, and calculation. In some examples, the NLP algorithm may include an entity extraction algorithm, a text analysis algorithm, a relationship extraction algorithm, a text generation algorithm, a sentiment analysis algorithm, a text similarity calculation algorithm, a machine reading comprehension algorithm, etc. In this way, different algorithm templates are selected for different fields, the scenario requirements of the field, etc. For example, for the annotation template of a resume, an algorithm template consisting of an entity extraction algorithm, a text analysis algorithm, a machine reading comprehension algorithm, etc. can be selected.

[0043] In the embodiments of the present application, the system can provide implemented NLP algorithms and also supports the upload function for NLP algorithms. Therefore, users can also submit NLP algorithms to the system so that the user's domain model can better meet the needs of the user, and then use the system's computing resources to train the domain model. Subsequently, analysis and processing based on the domain model can also be provided based on the system's computing resources. In some other optional embodiments, after obtaining user authorization, the NLP algorithm uploaded by the user can also be shared with other users. Thus, the system can provide some NLP algorithms, and can also provide NLP algorithms uploaded by users after obtaining user authorization, thereby expanding the capabilities of the system and providing more basic or advanced capabilities of algorithms.

[0044] Step 106: Use the labeled data to train the natural language processing algorithm to obtain a trained domain model of the domain.

[0045] After selecting the natural language processing algorithm corresponding to the domain, the domain model of the domain can be initialized according to the natural language processing algorithm. The labeled data is used as training data and input into the domain model of the domain for training.

[0046] The data of the domain can be input into the domain model to obtain the corresponding processing results; the processing results are analyzed according to the annotation information of the data, and the domain model is adjusted according to the analysis results until the processing results of the domain model meet the processing standards, which can be used as the trained domain model. For example, the parameters in the domain model are adjusted by back propagation based on the annotation information and the processing results; for example, the loss function is determined based on the annotation information and the processing results, and the parameters in the domain model are adjusted based on the loss function.

[0047] Therefore, data annotation can be performed based on the annotation page provided by the system, improving data annotation efficiency. The domain model can also be customized based on the natural language processing algorithm provided by the system, and then the domain model can be trained through the annotation information to quickly generate the domain model.

[0048] The system can also provide a deployment function for the domain model. Users can deploy the domain model at the desired location. For example, when a user accesses the cloud platform, the domain model of the domain can be deployed on the cloud platform, so that when the resources of the cloud platform are called, the deployed domain model can be used to provide data processing in the domain. Therefore, in some optional embodiments, the trained domain model can be deployed at the target location. The deployed domain model is used to perform data analysis to obtain the corresponding processing results. The processing results can also be used as training data and flowed back to the domain model to train the domain model and provide the accuracy of the domain model.

[0049] In summary, the data in the field is labeled to obtain labeled data, which makes it easier to customize the training data in each field and improve the efficiency of obtaining training data. The natural language processing algorithm can also be selected according to the field, so that users do not need to program themselves to implement the algorithm, thereby improving processing efficiency. The labeled data can then be used to train the natural language processing algorithm to obtain a domain model of the field after training, thereby improving the accuracy of natural language related data processing in the corresponding field.

[0050] On the basis of the above embodiments, the embodiments of the present application further provide a data processing method, which can be discussed in combination with data annotation and domain model training.

[0051] Reference Figure 3 , showing a schematic diagram of another data processing example of an embodiment of the present application.

[0052] Step 302: Determine the annotation information of the object.

[0053] Each data that needs to be annotated in a domain can be called an object of the domain, and the data content of the data is the object information, so that the data can be annotated based on the page.

[0054] In an optional embodiment, determining the annotation information of the object includes: providing an annotation page; importing the object information of the object in the annotation page and annotating it to determine the corresponding annotation information.

[0055] The embodiment of the present application may provide a labeling page to assist users in labeling objects. The labeling page refers to a page for providing information labeling capabilities. Information that needs to be labeled can be imported into this page, so that the corresponding labeling page can be displayed and a labeling function for the imported information can be provided. Among them, the scene of named entity recognition can be used as an object, and different objects can be determined for different scenes. For example, for the analysis scene of resumes, the resume object can be determined, and the corresponding object information is the resume content; for the analysis scene of user registration information, the user information object can be determined, and the corresponding object information is the user information content, etc.

[0056] In a further optional embodiment, the step of importing the object information of the object in the annotation page and annotating the object to determine the corresponding annotation information includes: importing the object information of the object in the annotation page to display the object information of the object; obtaining the annotation information in the annotation page, the annotation information including: entity type and entity information. The annotation template of the object can also be determined based on the annotation information.

[0057] The user can determine the object to be analyzed according to the needs, so as to obtain the object information of an example of the object. For example, for a resume object, the resume information of a certain person can be obtained. The corresponding object information can be imported into the annotation page, so that the annotation page can receive the uploaded object information and import it, and display the object information in the annotation page. For example, for a cross-border e-commerce website or a web page of an e-commerce website, the web page information can be imported into the annotation page as the object information, so as to display the web page.

[0058] Then, select the information to be annotated on the annotation page, such as framing the information to be annotated, etc. The corresponding auxiliary annotation box is displayed based on the user's selection. The user can set the entity type of the selected annotation information in the auxiliary annotation box, and the selected annotation information is the entity information of the entity type, and a piece of annotation information consisting of the entity information and the entity type is obtained. One or more annotation information can be annotated on an information annotation page. For example, for cross-border e-commerce websites and web pages of e-commerce websites, you can annotate the product name, product category, place of shipment, guarantee information, size information, and various product information such as the material, pattern, style, etc. of the product, so as to obtain one or more annotation information.

[0059] In some optional embodiments, the obtaining of annotation information on the annotation page includes: receiving selected target information; using the target information as entity information, and determining the entity type of the entity information. The user can select the information to be annotated on the annotation page, such as selecting the target information by dragging, clicking, etc. The target information can be various information such as words, phrases, sentences, and URLs, which can be determined according to the type of information required for annotation of the object. After determining the selected target information, the target information can be used as entity information, and then the entity type of the entity information can be set, such as by triggering a setting box by right-clicking, or directly displaying a corresponding auxiliary setting box, etc., so as to set the entity type of the entity information, and obtain a piece of annotation information consisting of the entity information and the entity type.

[0060] In a further optional embodiment, the target information is used as entity information and the entity type of the entity information is determined, including: displaying an auxiliary annotation box corresponding to the target information; determining the entity type through the auxiliary annotation box, and using the target information as entity information of the entity type. After selecting the target information, an auxiliary annotation box can be displayed next to the target information, and then the user can set the entity type in the auxiliary annotation box. In some examples, the user can enter the entity type, and in other examples, some possible entity type options can also be provided for the user to choose, so as to determine the entity type to which the target information belongs based on the selection, and obtain the corresponding entity type and entity information.

[0061] like Figure 2 In the example of the annotation page shown, the initial annotation page can be opened as follows before data is imported. Figure 2 The first page example in the example, after importing the resume Figure 2 As shown in the second page example in the figure, after marking on the page, you can Figure 3 As shown in the example of the third page in the resume, mark the entity types such as name, gender, ethnicity, date of birth, native place, graduation school, education, time period, resume link, and the corresponding entity information in the resume.

[0062] In some other optional embodiments, the annotation page may include an information display area and an annotation information area, so that the imported object information is displayed in the information display area. After selecting the target information, the target information can be displayed in the annotation information area, and a type input box corresponding to the information can be displayed. The entity type can be selected or input in the type input box, so as to determine the annotated entity type and the corresponding entity information. Figure 2 In the third page example, the left side of the page is the information display area, and the right side is the annotation information area.

[0063] In a further optional embodiment, the annotation information is displayed in the annotation information area according to the entity type. A triggering of an edit control of a specified entity type in the annotation information area and a selection of target information in the information display area are received; and the target information is determined to be entity information of the specified entity type.

[0064] Edit controls can be configured for each entity type, and can be triggered, such as Figure 1 By clicking the add annotation control and then selecting corresponding target information in the information display area, the target information can be automatically added to the annotation information area as entity information of the entity type, as a record of entity information under the entity type.

[0065] After completing the annotation of an object information, the same type of object information can be automatically annotated based on the annotation information of the object information. In some other examples, the user can also check the automatically generated annotation information based on the annotation page, so as to add, modify, and delete the corresponding annotation information.

[0066] Step 304: Select a natural language processing algorithm and initialize the domain model.

[0067] After the object information of the object is labeled, various labeling information can be obtained as training data. Therefore, the model needs to be initialized. The system of the embodiment of the present application provides various natural language algorithms, so that the user can select the required natural language algorithm to customize the required domain model, and initialize the domain model of the corresponding domain according to the selected natural language processing algorithm.

[0068] Among them, algorithm templates of natural language algorithms can be provided, and the NLP algorithms provided based on the algorithm templates can perform various processing such as text extraction, analysis, and calculation. In some examples, NLP algorithms may include entity extraction algorithms, text analysis algorithms, relationship extraction algorithms, text generation algorithms, sentiment analysis algorithms, text similarity calculation algorithms, machine reading comprehension algorithms, etc. Therefore, different algorithm templates can be selected for different objects and scene requirements. For example, for the annotation template of resumes, an algorithm template composed of entity extraction algorithms, text analysis algorithms, machine reading comprehension algorithms, etc. can be selected to initialize the domain model.

[0069] Step 106: Use the labeled information as training data to train the domain model to obtain a trained domain model.

[0070] Then the labeled data can be used as training data and input into the domain model for model training. The object information can be input into the domain model to obtain the corresponding processing result; the processing result is analyzed according to the labeled information of the object information, and the domain model is adjusted according to the analysis result until the processing result of the domain model meets the processing standard, which can be used as the trained domain model.

[0071] In an optional embodiment, the use of the labeled information as training data to train the domain model includes: inputting the object information of the object into the domain model to obtain a corresponding processing result; and adjusting the domain model based on the processing result and the labeled information. Using the labeled information as training data, the object information when the labeled information is not labeled can be input into the domain model for processing to obtain a corresponding processing result, and then the domain model is adjusted using the processing result and the labeled information. For example, the parameters in the domain model are adjusted by back propagation based on the labeled information and the processing result; for example, a loss function is determined based on the labeled information and the processing result, and the parameters in the domain model are adjusted based on the loss function.

[0072] Therefore, data annotation can be performed based on the annotation page provided by the system, improving data annotation efficiency. The domain model can also be customized based on the natural language processing algorithm provided by the system, and then the domain model can be trained through the annotation information to quickly generate the domain model.

[0073] The system can also provide a domain model deployment function. Users can deploy the domain model at the desired location. For example, when a user accesses a cloud platform, the domain model can be deployed on the cloud platform, so that when calling the resources of the cloud platform, the deployed domain model can be used for processing.

[0074] Therefore, in some optional embodiments, the trained domain model can be deployed at the target location. The deployed domain model is used to perform data analysis to obtain the corresponding natural language processing results. The domain model is deployed to the required target location, so that the deployed domain model can be called in the required service processing to analyze the corresponding data and obtain the natural language processing results. The natural language processing results can also be used as training data to train the domain model to improve the accuracy of the domain model.

[0075] Based on the above embodiments, the embodiments of the present application provide a domain customization system, which includes the following hierarchical architecture: infrastructure layer, open architecture layer, algorithm center layer and product function layer, such as Figure 4 shown.

[0076] The infrastructure layer can provide computing and storage capabilities of various software and hardware, such as providing CPU and GPU (Graphics Processing Unit) for hardware computing, and providing storage capabilities of storage units, including structured storage capabilities, file storage and other storage capabilities. It can also provide corresponding message and log processing, as well as containers and computing scheduling. It can support various product functions through containerization and elastic scheduling capabilities.

[0077] The open architecture layer can provide various open architecture algorithm libraries. The specific algorithm libraries can be applied to the programming implementation of various machine learning algorithms. The specific algorithm libraries can be determined according to needs.

[0078] The algorithm center layer can provide various natural language processing algorithms, including entity extraction algorithms, text analysis algorithms, relationship extraction algorithms, text generation algorithms, sentiment analysis algorithms, text similarity calculation algorithms, machine reading comprehension algorithms, etc.

[0079] The product function layer includes various functions that the system can provide: such as data labeling function, which can be achieved by providing a labeling page; customized model function, which can provide various machine learning algorithms, natural language processing algorithms, etc. to customize domain models, systematically support customized models, and have the ability to solve data processing in the corresponding field; model deployment function, which can assist users to deploy domain models at the required target location; prediction and feedback function can provide predictions based on the domain model, and can feedback the processing results of the deployed domain model as training data to improve the accuracy of the domain model.

[0080] In an embodiment of the present application, the data processing system may also include operation and maintenance tools such as rule engine, permission management, operation and maintenance monitoring, and grayscale release, so as to assist the data processing system to better provide various functions.

[0081] On the basis of the above-mentioned embodiments, the embodiments of the present application also provide a data processing method, which can customize the model based on the various functions provided by the data processing system.

[0082] Reference Figure 5 , showing a step flow chart of an embodiment of a data processing method of the present application.

[0083] Step 502, providing a marking page.

[0084] Step 504: import the object information of the object in the annotation page and perform annotation to determine the corresponding annotation information.

[0085] The step of importing the object information of the object in the annotation page and annotating the object to determine the corresponding annotation information includes: importing the object information of the object in the annotation page and displaying the object information of the object; obtaining the annotation information in the annotation page, wherein the annotation information includes: entity type and entity information. The annotation template of the object can also be determined based on the annotation information.

[0086] In an optional embodiment, the obtaining of annotation information on the annotation page includes: receiving selected target information; using the target information as entity information and determining the entity type of the entity information. Using the target information as entity information and determining the entity type of the entity information includes: displaying an auxiliary annotation box corresponding to the target information; determining the entity type through the auxiliary annotation box, and using the target information as entity information of the entity type.

[0087] In another optional embodiment, the annotation information is displayed in the annotation information area of ​​the annotation page according to the entity type. A triggering of an edit control of a specified entity type in the annotation information area and a selection of target information in the information display area are received; and the target information is determined to be entity information of the specified entity type.

[0088] Step 506: Select a natural language processing algorithm and initialize the domain model.

[0089] Step 508: input the object information of the object into the domain model to obtain the corresponding processing result.

[0090] Step 510: Adjust the domain model according to the processing result and the annotation information to obtain a trained domain model.

[0091] Step 512: deploy the trained domain model at the target location.

[0092] Step 514, using the deployed domain model to perform data analysis to obtain corresponding natural language processing results.

[0093] Step 516: Use the natural language processing results as training data to train the domain model.

[0094] The steps of this embodiment are similar to the corresponding steps of the above embodiment, and the details can be found in the description of the corresponding steps in the above embodiment.

[0095] Taking the application in the translation field as an example, a marking page can be provided, and the translation data can be imported and marked in the marking page to determine the marking information. Among them, the marking information can also be translated into the corresponding language based on the needs of the translation field, and the specific requirements are determined. Then, the translation algorithm and the natural language processing algorithm can be combined to initialize the domain model of the translation field, and then the data can be input into the domain model to obtain the corresponding processing result, which can be the result of identifying the entity and translating it. Then, the domain model is adjusted according to the processing result and the marking information of the data to obtain the trained domain model. The trained domain model is deployed at the target location, so that the content in objects such as web pages and texts can be identified and translated based on the domain model.

[0096] Based on the various functions provided by the data processing system, users can achieve online processing of data annotation, model training, model deployment and use in a systematic way, allowing users to customize NLP models by themselves and solve data processing needs in various scenarios.

[0097] It is also possible to perform systematic version management on data and models, so that different versions of domain models can be trained using the corresponding versions of data.

[0098] On the basis of the above-mentioned embodiments, the embodiments of the present application further provide a processing method based on a domain model, which provides data processing based on the domain model after generating the domain model based on customized annotation data and natural language algorithm.

[0099] Reference Figure 6 , showing a step flow chart of an embodiment of a processing method based on a domain model of the present application.

[0100] Step 602: Provide a domain model, where the domain model is generated based on customized annotation data and a natural language algorithm.

[0101] Step 604: Use the domain model to perform data analysis to obtain corresponding natural language processing results.

[0102] The natural language processing results may also be used as training data to train the domain model.

[0103] The steps of this embodiment are similar to the corresponding steps of the above embodiment, and the details can be found in the description of the corresponding steps in the above embodiment.

[0104] Taking the application in the translation field as an example, it can provide a domain model for recognition and translation, so that it can recognize and translate the content of cross-border e-commerce web pages, downloaded files, and other types of web pages to obtain corresponding processing results.

[0105] Models can be deployed and used to achieve online processing, allowing users to customize NLP models by themselves to solve data processing needs in various scenarios.

[0106] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0107] On the basis of the above embodiments, this embodiment further provides a domain model training device, which is applied to electronic devices such as terminal devices and servers.

[0108] Reference Figure 7 , shows a structural block diagram of a training embodiment of a domain model of the present application, which may specifically include the following modules:

[0109] The labeling module 702 is used to label the data in the field to obtain labeled data.

[0110] The algorithm selection module 704 is used to select a natural language processing algorithm according to the field.

[0111] The training module 706 is used to train the natural language processing algorithm using the annotated data to obtain a trained domain model of the domain.

[0112] The method further includes: a marking import module, which is used to obtain a marking page; and to import the data of the field into the marking page.

[0113] The annotation module is used to display the data on the annotation page; add annotation information to the data on the annotation page, and the annotation information includes: entity type and entity information.

[0114] The annotation module is further configured to display the annotation information in the annotation information area of ​​the annotation page according to the entity type.

[0115] The annotation module is further configured to determine the target information as entity information of the specified entity type according to the selection of the specified entity type and target information in the annotation information area.

[0116] In summary, the data in the field is labeled to obtain labeled data, which makes it easier to customize the training data in each field and improve the efficiency of obtaining training data. The natural language processing algorithm can also be selected according to the field, so that users do not need to program themselves to implement the algorithm, thereby improving processing efficiency. The labeled data can then be used to train the natural language processing algorithm to obtain a domain model of the field after training, thereby improving the accuracy of data processing in the corresponding field.

[0117] On the basis of the above embodiments, this embodiment further provides a data processing device, which is applied to electronic devices such as terminal devices and servers.

[0118] Reference Figure 8 , shows a structural block diagram of a data processing device embodiment of the present application, which may specifically include the following modules:

[0119] The information labeling module 802 determines the labeling information of the object.

[0120] The algorithm processing module 804 selects a natural language processing algorithm and initializes the domain model.

[0121] The model training module 806 is used to train the domain model using the annotation information as training data to obtain a trained domain model.

[0122] In summary, determining the annotation information of the object makes it easier for users to customize training data and improve the efficiency of obtaining training data. Natural language processing algorithms can also be selected to initialize the domain model. Users do not need to program themselves to implement the algorithm, which improves processing efficiency. Then, the annotation information can be used as training data to train the domain model, obtain a trained domain model, and improve the accuracy of the domain model.

[0123] Reference Fig. 9 , shows a structural block diagram of an optional embodiment of a data processing device of the present application, which may specifically include the following modules:

[0124] The information labeling module 802 determines the labeling information of the object.

[0125] The algorithm processing module 804 selects a natural language processing algorithm and initializes the domain model.

[0126] The model training module 806 is used to train the domain model using the annotation information as training data to obtain a trained domain model.

[0127] The deployment module 808 is used to deploy the trained domain model at a target location.

[0128] The processing module 810 is used to perform data analysis using the deployed domain model to obtain corresponding natural language processing results.

[0129] The training module 806 is further configured to use the natural language processing result as training data to train the domain model.

[0130] The information annotation module 802 is used to provide an annotation page; import object information of an object into the annotation page and perform annotation to determine corresponding annotation information.

[0131] The information marking module 802 includes: an information import submodule 8022 and an information marking submodule 8024, wherein:

[0132] The information import submodule 8022 is used to import the object information of the object in the annotation page and display the object information of the object.

[0133] The information annotation submodule 8024 is used to obtain annotation information on the annotation page, and the annotation information includes: entity type and entity information.

[0134] The information labeling submodule 8024 is used to receive selected target information; use the target information as entity information, and determine the entity type of the entity information.

[0135] The information annotation submodule 8024 is used to display an auxiliary annotation box corresponding to the target information; determine the entity type through the auxiliary annotation box, and use the target information as entity information of the entity type.

[0136] The information annotation submodule 8024 is further configured to display the annotation information in the annotation information area of ​​the annotation page according to entity type.

[0137] The information annotation submodule 8024 is further used to receive the triggering of the editing control of the specified entity type in the annotation information area and the selection of target information in the information display area; and determine the target information as entity information of the specified entity type.

[0138] The model training module 806 is used to input the object information of the object into the domain model to obtain the corresponding processing result; and adjust the domain model according to the processing result and the annotation information.

[0139] On the basis of the above embodiments, this embodiment further provides a data processing device, which is applied to electronic devices such as terminal devices and servers.

[0140] Reference Fig.10 , shows a structural block diagram of another embodiment of a processing device based on a domain model of the present application, which may specifically include the following modules:

[0141] A module 1002 is provided for providing a domain model, wherein the domain model is generated based on customized annotation data and a natural language algorithm.

[0142] The data analysis module 1004 is used to perform data analysis using the domain model to obtain corresponding natural language processing results.

[0143] It also includes: a feedback training module, which is used to use the natural language processing results as training data to train the domain model.

[0144] Based on the various functions provided by the data processing system, users can achieve online processing of data annotation, model training, model deployment and use in a systematic way, allowing users to customize NLP models by themselves and solve data processing needs in various scenarios.

[0145] It is also possible to perform systematic version management on data and models, so that different versions of domain models can be trained using the corresponding versions of data.

[0146] The data processing system of the embodiment of the present application can provide various algorithms required for natural language processing, so that users do not need to program themselves to implement the algorithm. Users can choose the required algorithm to customize the domain model, and can provide a labeling page for users to label data, so as to facilitate users to customize training data and improve the efficiency of obtaining training data, so as to use the labeling information as training data to train the domain model and obtain a trained domain model. The domain model can be used to process natural language related data, and the processed data obtained can also be returned to continue training the domain model to improve the accuracy of the domain model.

[0147] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0148] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices and servers (clusters).

[0149] The embodiments of the present disclosure may be implemented as a device configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the device may include electronic devices such as terminal devices and servers (clusters). Fig.11 An exemplary apparatus 1100 that can be used to implement various embodiments described in this application is schematically shown.

[0150] For one embodiment, Fig.11 An exemplary apparatus 1100 is shown having one or more processors 1102, a control module (chip set) 1104 coupled to at least one of the (one or more) processors 1102, a memory 1106 coupled to the control module 1104, a non-volatile memory (NVM) / storage device 1108 coupled to the control module 1104, one or more input / output devices 1110 coupled to the control module 1104, and a network interface 1112 coupled to the control module 1104.

[0151] The processor 1102 may include one or more single-core or multi-core processors, and the processor 1102 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 1100 can be used as a terminal device, server (cluster), etc. described in the embodiments of the present application.

[0152] In some embodiments, the apparatus 1100 may include one or more computer-readable media (e.g., memory 1106 or NVM / storage device 1108) having instructions 1114 and one or more processors 1102 combined with the one or more computer-readable media and configured to execute the instructions 1114 to implement a module to perform the actions described in the present disclosure.

[0153] For one embodiment, the control module 1104 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1102 and / or any suitable device or component in communication with the control module 1104 .

[0154] The control module 1104 may include a memory controller module to provide an interface to the memory 1106. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0155] The memory 1106 may be used, for example, to load and store data and / or instructions 1114 for the device 1100. For one embodiment, the memory 1106 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 1106 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).

[0156] For one embodiment, control module 1104 may include one or more input / output controllers to provide an interface to NVM / storage device 1108 and input / output device(s) 1110 .

[0157] For example, NVM / storage 1108 may be used to store data and / or instructions 1114. NVM / storage 1108 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0158] NVM / storage device 1108 may include storage resources that are physically part of the device on which apparatus 1100 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 1108 may be accessed via input / output device(s) 1110 over a network.

[0159] (One or more) input / output devices 1110 may provide an interface for the apparatus 1100 to communicate with any other appropriate device, and the input / output device 1110 may include a communication component, an audio component, a sensor component, etc. The network interface 1112 may provide an interface for the apparatus 1100 to communicate through one or more networks, and the apparatus 1100 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.

[0160] For one embodiment, at least one of the processor(s) 1102 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1104. For one embodiment, at least one of the processor(s) 1102 may be packaged together with the logic of one or more controllers of the control module 1104 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 1102 may be integrated on the same die with the logic of one or more controllers of the control module 1104. For one embodiment, at least one of the processor(s) 1102 may be integrated on the same die with the logic of one or more controllers of the control module 1104 to form a system-on-chip (SoC).

[0161] In various embodiments, the device 1100 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 1100 may have more or fewer components and / or a different architecture. For example, in some embodiments, the device 1100 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0162] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.

[0163] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0164] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0165] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal 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.

[0166] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including 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.

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

[0168] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0169] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0170] The above is a detailed introduction to a domain model training method and device, a data processing method and device, a processing method and device based on a domain model, an electronic device and a storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for training a domain model, characterized in that: The method comprises: Get the annotation page; Importing data of the field in the annotation page; Label the data in the field to obtain labeled data; Select at least one natural language processing algorithm according to the field to customize the required domain model, wherein the natural language processing algorithm includes at least one of the following: entity extraction algorithm, text analysis algorithm, relationship extraction algorithm, text generation algorithm, sentiment analysis algorithm, text similarity calculation algorithm, and machine reading comprehension algorithm; The natural language processing algorithm is trained using the annotated data to obtain a trained domain model of the domain.

2. The method according to claim 1, characterized in that The labeling of the data in the field includes: Displaying the data on the marked page; Add annotation information to the data on the annotation page, where the annotation information includes: entity type and entity information.

3. The method according to claim 2, characterized in that The method further comprises: In the annotation information area of ​​the annotation page, the annotation information is displayed according to the entity type.

4. The method according to claim 3, characterized in that The method further comprises: According to the selection of the specified entity type and target information in the annotation information area; The target information is determined to be entity information of the specified entity type.

5. A domain model training device, characterized in that: include: The annotation import module is used to obtain the annotation page; import the data of the field in the annotation page; The annotation module is used to annotate the data in the field and obtain the annotated data; An algorithm selection module, used to select at least one natural language processing algorithm according to the domain to customize the required domain model, wherein the natural language processing algorithm includes at least one of the following: an entity extraction algorithm, a text analysis algorithm, a relationship extraction algorithm, a text generation algorithm, a sentiment analysis algorithm, a text similarity calculation algorithm, and a machine reading comprehension algorithm; A training module is used to train the natural language processing algorithm using the annotated data to obtain a domain model of the domain after training.

6. The device according to claim 5, characterized in that The annotation module is used to display the data on the annotation page; add annotation information to the data on the annotation page, and the annotation information includes: entity type and entity information.

7. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, cause the processor to perform the method according to one or more of claims 1-4.

8. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to perform the method according to one or more of claims 1-4.

Citation Information

Patent Citations

  • Multi-class entity recognition model training method, entity recognition method, server and terminal

    CN110147551A

  • Text translator training method and device and professional field text semantic parsing method and device

    CN111178085A