Text Processing Method, Device, and Equipment in a Machine Learning Platform
By providing independent text processing model training, prediction and evaluation operators in the machine learning platform, the problem of difficulty in realizing subsequent production and application of machine learning models in the prior art is solved, and effective processing of text data and rapid extraction of information are realized.
Patent Information
- Application Number
- CN202010827214.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-17
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2040-08-17
AI Technical Summary
The prior art is difficult to effectively realize the subsequent production and application of machine learning models, so it is impossible to quickly utilize useful information extracted from text data.
It provides a text data processing method in a machine learning platform, including training text processing models, predicting text data and evaluating model performance, and implementing the entire process of text processing through independent training, prediction and evaluation operators.
This enables users without NLP experience to quickly apply text processing, realizing effective processing of text data and rapid extraction of information.
Smart Images

Figure CN114077664B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing, and more particularly, to a method for processing text data of a machine learning platform, a text processing device of a machine learning platform, a device including at least one computing device and at least one storage device, and a computer-readable storage medium. Background Art
[0002] With the development of artificial intelligence, the value of data has been continuously highlighted, and the demand for extracting and utilizing useful information in text data has become increasingly common.
[0003] In the prior art, it often uses a machine learning model to extract useful information from text data. However, it requires professionals in natural language processing (NLP). It is very difficult for those without NLP-related experience to complete. At the same time, the existing automated machine learning tools have overly simple and one-sided functions and cannot cover the entire process of machine learning model construction and application, that is, they cannot effectively realize the subsequent production and application of machine learning models, resulting in the inability to quickly apply the useful information extracted from text data. Summary of the Invention
[0004] An object of an embodiment of the present disclosure is to provide a new technical solution for processing text data in a machine learning platform.
[0005] According to a first aspect of the present disclosure, there is provided a method for processing text data in a machine learning platform, including:
[0006] Inputting training text data and its corresponding true label into a text processing model training operator to train a text processing model;
[0007] Inputting the text processing model and prediction text data into a text processing model prediction operator to obtain a prediction label of the prediction text data;
[0008] Inputting the prediction label and the true label corresponding to the prediction text data into a text processing model evaluation operator to obtain an evaluation index value of the text processing model; and,
[0009] Performing corresponding processing on the text processing model according to the evaluation index value.
[0010] Optionally, the text processing model is a text classification model, the true label and the prediction label are text classification results, the text processing model training operator is a text classification model training operator, the text processing model prediction operator is a text classification model prediction operator, and the text processing model evaluation operator is a text classification model evaluation operator;
[0011] Or,
[0012] The text processing model is an entity extraction model, the true label and the predicted label are entity information results, the training operator of the text processing model is an entity extraction model training operator, the prediction operator of the text processing model is an entity extraction model prediction operator, and the evaluation operator of the text processing model is an entity extraction model evaluation operator;
[0013] Or
[0014] The text processing model is a relation extraction model, the true label and the predicted label are entity relation results, the training operator of the text processing model is a relation extraction model training operator, the prediction operator of the text processing model is a relation extraction model prediction operator, and the evaluation operator of the text processing model is a relation extraction model evaluation operator.
[0015] Optionally, the method further includes the step of obtaining the training text data and the prediction text data based on the obtained initial text data.
[0016] The step of obtaining the training text data and the prediction text data based on the obtained initial text data includes:
[0017] Input the obtained initial text data into a text data splitting operator to split the initial text data into training text data and prediction text data;
[0018] Wherein, the training text data is used as the input of the training operator of the text processing model, and the prediction text data is used as the input of the prediction operator of the text processing model.
[0019] Optionally, obtaining the historical text data includes:
[0020] Provide at least one data import path;
[0021] Import the historical text data from the selected data import path; and,
[0022] Save the imported historical text data.
[0023] Optionally, the method further includes:
[0024] In response to a configuration operation for the text processing model training operator, provide a first configuration interface for configuring the text processing model training operator; for the text processing model training operator to perform feature engineering processing on the training text data and its corresponding true labels according to the first configuration information input through the first configuration interface to obtain training text samples; and train the text processing model based on the training text samples according to a preset model training algorithm.
[0025] Optionally, the first configuration interface involves at least one of the following configuration items: an input source configuration item of the text processing model training operator, a target value field configuration item, a model training algorithm configuration item, a tuning algorithm and its hyperparameter configuration item, and a configuration item for the maximum length of text data.
[0026] Optionally, when the text processing model is the text classification model,
[0027] The configuration items involved in the first configuration interface further include at least one of an application resource configuration item and a text language type configuration item corresponding to the text data.
[0028] Optionally, when the text processing model is the entity extraction model,
[0029] A selection item related to the text data whitelist in the input source configuration item;
[0030] Wherein, the text data whitelist is a list defining entity information, and the entity information includes an entity name and its corresponding entity type.
[0031] Optionally, the method further includes:
[0032] Use the entity extraction model training operator to parse the text data whitelist;
[0033] Run the parsed text data whitelist to obtain the entity names defined in the text data whitelist and their corresponding entity types, for the instance extraction model prediction operator to predict the predicted entity types of each entity name in the input predicted text data according to the defined entity names and their corresponding entity types.
[0034] Optionally, the method further includes:
[0035] In response to a trigger operation for the text processing model prediction operator, provide a second configuration interface for configuring the text processing model prediction operator; for the text processing model prediction operator to provide prediction labels for the predicted text data by using the trained text processing model according to the second configuration information input through the second configuration interface.
[0036] Optionally, the second configuration interface relates to at least one of the following configuration items: an input source configuration item of the text processing model prediction operator, and a prediction target value field configuration item.
[0037] Optionally, the method further includes:
[0038] In response to a trigger operation for the text processing model evaluation operator, providing a third configuration interface for configuring the text processing model evaluation operator; so that the text processing model evaluation operator compares the prediction label with the true label corresponding to the prediction text data according to the third configuration information input through the third configuration interface, and obtains an evaluation index value of the text processing model.
[0039] Optionally, the third configuration interface relates to at least one of the following configuration items: an input source configuration item of the text processing model evaluation operator, and a configuration item of the evaluation index.
[0040] Optionally, the corresponding processing of the text processing model according to the evaluation index value includes:
[0041] In the case where the evaluation index value is greater than or equal to an evaluation index threshold, putting the text processing model on the line for application.
[0042] Optionally, the corresponding processing of the text processing model according to the evaluation index value further includes:
[0043] In the case where the evaluation index value is less than the evaluation index threshold, retraining the text processing model based on the text processing model training operator.
[0044] Optionally, the retraining of the text processing model based on the text processing model training operator includes:
[0045] Adjusting hyperparameters for model training in the text processing model training operator, and continuing to train the text processing model based on the adjusted hyperparameters.
[0046] Optionally, the adjusting hyperparameters for model training in the text processing model training operator and continuing to train the text processing model based on the adjusted hyperparameters includes:
[0047] Re-selecting a hyperparameter tuning algorithm for generating the hyperparameters in the text processing model training operator;
[0048] Generating new hyperparameters according to the re-selected tuning algorithm, and continuing to train the text processing model based on the new hyperparameters.
[0049] Optionally, continuing to train the text processing model based on the text processing model training operator further includes:
[0050] Adjust the quantity of the training text data, and input the adjusted training text data and its corresponding true label into the text processing model training operator to continue training the text processing model.
[0051] Optionally, continuing to train the text processing model based on the text processing model training operator further includes:
[0052] Adjust the model training algorithm used for training the model in the text processing model training operator, and continue to train the text processing model according to the adjusted model training algorithm.
[0053] According to a second aspect of the present disclosure, there is also provided a text data processing device in a machine learning platform, which includes:
[0054] A model training module, configured to input training text data and its corresponding true label into a text processing model training operator to train a text processing model;
[0055] A model prediction module, configured to input the text processing model and prediction text data into a text processing model prediction operator to obtain a prediction label of the prediction text data;
[0056] A model evaluation module, configured to input the prediction label and the true label corresponding to the prediction text data into a text processing model evaluation operator to obtain an evaluation metric value of the text processing model; and,
[0057] A model processing module, configured to perform corresponding processing on the text processing model according to the evaluation metric value.
[0058] Optionally, the text processing model is a text classification model, the true label and the prediction label are text classification results, the text processing model training operator is a text classification model training operator, the text processing model prediction operator is a text classification model prediction operator, and the text processing model evaluation operator is a text classification model evaluation operator;
[0059] Or,
[0060] The text processing model is an entity extraction model, the true label and the prediction label are entity information results, the text processing model training operator is an entity extraction model training operator, the text processing model prediction operator is an entity extraction model prediction operator, and the text processing model evaluation operator is an entity extraction model evaluation operator;
[0061] Or
[0062] The text processing model is a relation extraction model, the true label and the predicted label are entity relation results, the training operator of the present processing model is a relation extraction model training operator, the prediction operator of the text processing model is a relation extraction model prediction operator, and the evaluation operator of the text processing model is a relation extraction model evaluation operator.
[0063] Optionally, the device further includes an acquisition module, and the acquisition module is configured to:
[0064] Input the obtained initial text data into a text data splitting operator to split the initial text data into training text data and prediction text data;
[0065] Wherein, the training text data is used as the input of the training operator of the text processing model, and the prediction text data is used as the input of the prediction operator of the text processing model.
[0066] Optionally, the acquisition module is further configured to:
[0067] Provide at least one data import path;
[0068] Import the historical text data from the selected data import path; and,
[0069] Save the imported historical text data.
[0070] Optionally, the model training module is further configured to:
[0071] In response to a configuration operation for the training operator of the text processing model, provide a first configuration interface for configuring the training operator of the text processing model; so that the training operator of the text processing model performs feature engineering processing on the training text data and its corresponding true label according to the first configuration information input through the first configuration interface to obtain training text samples; and train the text processing model based on the training text samples according to a preset model training algorithm.
[0072] Optionally, the first configuration interface relates to at least one of the following configuration items: an input source configuration item of the training operator of the text processing model, a target value field configuration item, a model training algorithm configuration item, a tuning algorithm and its hyperparameter configuration item, and a configuration item for the maximum length of the text data.
[0073] Optionally, when the text processing model is the text classification model,
[0074] The configuration items related to the first configuration interface further include at least one of an application resource configuration item and a text language type configuration item corresponding to the text data.
[0075] Optionally, when the text processing model is the entity extraction model,
[0076] a selection item related to the text data whitelist in the input source configuration item;
[0077] wherein, the text data whitelist is a list defining entity information, and the entity information includes an entity name and its corresponding entity type.
[0078] Optionally, the model training module is further configured to:
[0079] parse the text data whitelist by using the entity extraction model training operator;
[0080] run the parsed text data whitelist to obtain the entity name and its corresponding entity type defined in the text data whitelist for
[0081] the instance extraction model prediction operator to predict the input prediction text data according to the defined entity name and its corresponding entity type to obtain the prediction label of the prediction text data.
[0082] Optionally, the model prediction module is further configured to:
[0083] in response to a trigger operation for the text processing model prediction operator, provide a second configuration interface for configuring the text processing model prediction operator; for the text processing model prediction operator to provide a prediction label for the prediction text data according to the second configuration information input through the second configuration interface by using the trained text processing model.
[0084] Optionally, the second configuration interface relates to at least one of the following configuration items: an input source configuration item of the text processing model prediction operator, a prediction target value field configuration item.
[0085] Optionally, the model estimation module is further configured to:
[0086] in response to a trigger operation for the text processing model evaluation operator, provide a third configuration interface for configuring the text processing model evaluation operator; so that the text processing model evaluation operator compares the prediction label with the true label corresponding to the prediction text data according to the third configuration information input through the third configuration interface to obtain the evaluation index value of the text processing model.
[0087] Optionally, the third configuration interface relates to at least one of the following configuration items: an input source configuration item of the text processing model evaluation operator, a configuration item of the evaluation index.
[0088] Optionally, the model processing module is further configured to:
[0089] When the value of the evaluation metric is greater than or equal to the evaluation metric threshold, put the text processing model into online application.
[0090] Optionally, the model processing module is further configured to:
[0091] When the value of the evaluation metric is less than the evaluation metric threshold, continue to train the text processing model based on the operator for training the text processing model again.
[0092] Optionally, the model processing module is further configured to:
[0093] Adjust the hyperparameters for model training in the operator for training the text processing model, and continue to train the text processing model based on the adjusted hyperparameters.
[0094] Optionally, the model processing module is further configured to:
[0095] Re-select the tuning algorithm for generating the hyperparameters in the operator for training the text processing model;
[0096] Generate new hyperparameters according to the re-selected tuning algorithm, and continue to train the text processing model based on the new hyperparameters.
[0097] Optionally, the model processing module is further configured to:
[0098] Adjust the quantity of the training text data, and input the adjusted training text data and its corresponding true labels into the operator for training the text processing model to continue training the text processing model.
[0099] Optionally, the model processing module is further configured to:
[0100] Adjust the model training algorithm for training the model in the operator for training the text processing model, so as to continue training the text processing model according to the adjusted model training algorithm.
[0101] According to the third aspect of the present disclosure, there is also provided a device including at least one computing device and at least one storage device, wherein the at least one storage device is configured to store instructions for controlling the at least one computing device to execute the method according to the first aspect above.
[0102] According to the fourth aspect of the present disclosure, there is also provided a computer-readable storage medium, on which a computer program is stored, and the computer program realizes the method according to the first aspect above when being executed by a processor.
[0103] The method according to an embodiment of the present disclosure provides mutually independent text processing model training operators, text processing model prediction operators, and text processing model evaluation operators. The training of training text data is completed through the text processing model training operators to train a text processing model. The prediction of prediction text data is completed through the text processing model prediction operators and the text processing model to obtain a prediction result. Moreover, the evaluation of the prediction result is completed through the text processing model evaluation operators to obtain an evaluation result of the text processing model, which can intuitively display the entire process of text processing, enabling users without NLP experience to quickly apply text processing to extract the required information. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] Other features and advantages of the present invention will become clear from the following detailed description of the exemplary embodiments of the present invention with reference to the accompanying drawings.
[0105] Figure 1 is a block diagram showing an example of the hardware configuration of an electronic device that can be used to implement the embodiments of the present disclosure;
[0106] Figure 2 shows a flowchart of a text processing method in a machine learning platform according to an embodiment of the present disclosure;
[0107] Figures 3a to 3c shows a schematic diagram of the interface display of a text processing method in a machine learning platform according to an embodiment of the present disclosure;
[0108] Figure 4 shows a schematic block diagram of a text processing device in a machine learning platform according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0109] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present invention.
[0110] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present invention or its application or use.
[0111] Techniques, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods, and devices should be considered as part of the specification.
[0112] In all the examples shown and discussed herein, any specific values should be construed as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values.
[0113] It should be noted that like reference numerals and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof in subsequent figures is not required.
[0114] Next, various embodiments and examples according to embodiments of the present invention will be described with reference to the accompanying drawings.
[0115] <Hardware Configuration>
[0116] The method of the embodiments of the present disclosure can be implemented by at least one electronic device, that is, the apparatus 4000 for implementing the method can be arranged on the at least one electronic device. Figure 1 The hardware structure of an arbitrary electronic device is shown. Figure 1 The shown electronic device can be a portable computer, a desktop computer, a workstation, a server, etc., or any other device having a computing device such as a processor and a storage device such as a memory, which is not limited herein.
[0117] As Figure 1 shown, the electronic device 1000 can include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and so on. Among them, the processor 1100 is used to execute a computer program. The computer program can be written in an instruction set such as x86, Arm, RISC, MIPS, SSE, etc. The memory 1200 includes, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, etc. The interface device 1300 includes, for example, a USB interface, a headphone interface, etc. The communication device 1400 can perform wired or wireless communication, specifically, it can include Wifi communication, Bluetooth communication, 2G / 3G / 4G / 5G communication, etc. The display device 1500 is, for example, a liquid crystal display screen, a touch display screen, etc. The input device 1600 can include, for example, a touch screen, a keyboard, a somatosensory input, etc. The electronic device 1000 can output voice information through the speaker 1700, and can collect voice information through the microphone 1800, etc.
[0118] Figure 1 The shown electronic device is merely illustrative and in no way means any limitation to the present invention, its application, or use. Applied to the embodiments of the present disclosure, the memory 1200 of the electronic device 1000 is used to store instructions for controlling the processor 1100 to operate to execute the text processing method in the machine learning platform of the embodiments of the present disclosure. Those skilled in the art can design instructions according to the solutions disclosed in the present invention. How the instructions control the processor to operate is well known in the art, so it will not be described in detail herein.
[0119] In one embodiment, a device is provided that includes at least one computing device and at least one storage device. The at least one storage device is used to store instructions for controlling the at least one computing device to execute a method according to any embodiment of the present disclosure.
[0120] The device may include at least one Figure 1 such as the illustrated electronic device 1000 to provide at least one computing device such as a processor and at least one storage device such as a memory, which are not limited herein.
[0121] <Method Embodiment>
[0122] In this embodiment, a text processing method in a machine learning platform is provided. This method can be implemented by Figure 1 the illustrated electronic device 1000, for example, it can be implemented by a text processing device 4000 in the machine learning platform of the electronic device 1000.
[0123] According to Figure 2 as shown, the text processing method in the machine learning platform of this embodiment may include the following steps S2100 to S2400:
[0124] Step S2100: Input training text data and its corresponding true labels into a text processing model training operator to train a text processing model.
[0125] The model training operator is a tool for performing data preprocessing on the input text training data, performing feature engineering on the preprocessed training text data, and training a text processing model based on the results of the feature engineering.
[0126] The training text data is text data used for training a text processing model. In this step S2100, it may be training text data and the following prediction text data obtained based on the acquired initial text data. Here, this embodiment may also provide a text data splitting operator to use the text data splitting operator to split the initial text data into training text data and prediction text data. The text data splitting operator may be Figure 3a 、 Figure 3b 、 Figure 3cThe "Text Data Splitting Operator" in the canvas shown. For example, the obtained initial text data can be input into the text data splitting operator to split the initial text data into training text data and prediction text data, and use the training text data as the input of the text processing model training operator in step S2100 of this step, and use the prediction text data as the input of the text processing model prediction operator in the following step S2200. Based on this, the steps of obtaining historical text data in this embodiment may include the following steps: providing at least one data import path; importing historical text data from the selected data import path; and saving the imported historical text data.
[0127] For example, it can be to import historical text data through one or more of the following import methods, that is, import data stored locally into the electronic device 1000, import data in the database into the electronic device 1000, import data through HDFS shallow copy, import data through HDFS, and import data through Hive. In this embodiment, after saving the imported initial text data, the initial text data can be dragged to the canvas of the machine learning platform, and the initial text data can be used as a node in the canvas. This node can be Figure 3a nlp_c1 shown, Figure 3b entity_cons shown, Figure 3c nlp_re2 shown. It can be to Figure 3a connect the "nlp_c1" node shown to the "Text Data Splitting Operator", Figure 3b connect the "entity_cons" node shown to the "Text Data Splitting Operator", and Figure 3c connect the "nlp_re2" node shown to the "Text Data Splitting Operator", so as to obtain the corresponding training text data and prediction text data respectively.
[0128] The text processing model includes at least one of a text classification model, an entity extraction model, and a relationship extraction model. And the text classification model is used to process text data to classify the text data, the entity extraction model is used to process text data to extract entity information in the text data, and the relationship extraction model is used to process text data to extract the relationships between entities in the text data.
[0129] When the text processing model is a text classification model, the above true label is the true text classification result. Here, the text processing model training operator is a text classification model training operator, for example Figure 3a the "Text Classification Model Training Operator" shown in the canvas.
[0130] In the case where the text processing model is an entity extraction model, the above true label is the result of true entity information. Here, the text processing model training operator is an entity extraction model training operator. For example Figure 3b The "entity extraction model training operator" shown in the canvas. The entity information includes the entity name and the corresponding entity type. The entity type can be, for example, a person name (person), an organization name (organization), a location name (location), and all other entities identified by a name.
[0131] In the case where the text processing model is a relationship extraction model, the above true label is the result of true entity relationships. Here, the text processing model training operator is an entity relationship model training operator. For example Figure 3c The "entity relationship model training operator" shown in the canvas.
[0132] In this embodiment, it can be to connect the "text data splitting operator" and the "text processing model training operator" to input the training data text and its corresponding true label obtained by splitting with the "text data splitting operator" into the "text processing model training operator", and configure the "text processing model training operator", and then train the text processing model according to the configuration information. Here, the text processing method in the machine learning platform in this embodiment may further include:
[0133] In response to a configuration operation for the text processing model training operator, provide a first configuration interface for configuring the text processing model training operator; for the text processing model training operator to perform feature engineering processing on the training text data and its corresponding true label according to the first configuration information input through the first configuration interface to obtain training text samples; and train the text processing model based on the training text samples according to a preset model training algorithm.
[0134] For example, it can be to perform a click operation on the text processing model training operator, and the electronic device 1000 provides a configuration interface for configuring the text processing model training operator in response to this click operation. The configuration interface involves at least one of the following configuration items: the input source configuration item of the text processing model training operator, the target value field configuration item, the model training algorithm configuration item, the tuning algorithm and its hyperparameter configuration item, and the configuration item of the maximum length of the text data.
[0135] The above configuration item of the maximum length of the text data is used to limit the length of the text data. For example, it can limit the maximum length of the text data processed by the model. Usually, the maximum length of this text data is 300.
[0136] The above target value field configuration item is used to represent the field name of the field where the model prediction target is located.
[0137] The above model training algorithm configuration items are used to configure the model training algorithm for training a model. This model training algorithm can be a Logistic Regression (LR) algorithm, a Gradient Boost Regression Tree (GBRT) algorithm, a Support Vector Machine (SVM) algorithm, a HE-TreeNet (High-Dimensional Discrete Embedded Tree Network) algorithm, a Gradient Boosting Decision Tree (GBDT) algorithm, a Random Forest algorithm, etc., or other machine learning algorithms for training machine learning models. This embodiment does not make a limitation here.
[0138] The above hyperparameter tuning algorithm is an algorithm used to optimize the parameters corresponding to a machine learning algorithm. This hyperparameter tuning algorithm can be random search, grid search, Bayesian optimization, etc.
[0139] The above hyperparameters can include model hyperparameters and training hyperparameters. The model hyperparameters are used to define the hyperparameters of the model, such as, but not limited to, activation functions (such as the identity function, the sigmoid function, and the truncated ramp function, etc.), the number of hidden layer nodes, the number of convolutional layer channels, and the number of fully connected layer nodes, etc. The training hyperparameters are used to define the hyperparameters of the model training process, such as, but not limited to, the learning rate, the batch size, and the number of iterations, etc.
[0140] As Figure 3a shown in the canvas, connect the "nlp_c1" node to the "Text Data Splitting Operator", and connect the left output point of the "Text Data Splitting Operator" to the "Text Classification Model Training Operator". After completing the configuration of the configuration information and selecting to run, the "Text Classification Model Training Operator" can be used to perform feature engineering processing on the training text data and its corresponding true classification results to obtain training text samples, and based on the configured model training algorithm, train a text classification model based on the training text samples.
[0141] As Figure 3b shown in the canvas, connect the "entity_cons" node to the "Text Data Splitting Operator", and connect the left output point of the "Text Data Splitting Operator" to the "Entity Extraction Model Training Operator". After completing the configuration of the configuration information and selecting to run, the "Text Classification Model Training Operator" can be used to perform feature engineering processing on the training text data and its corresponding true entity information results to obtain training text samples, and based on the configured model training algorithm, train an entity extraction model based on the training text samples.
[0142] As Figure 3cFor the canvas shown, connect the "nlp_c1" node to the "Text Data Splitting Operator", and connect the left output point of the "Text Data Splitting Operator" to the "Entity Relationship Model Training Operator". After completing the configuration of the configuration information and selecting to run, the "Entity Relationship Model Training Operator" can be used to perform feature engineering on the training text data and its corresponding true entity relationship results to obtain training text samples, and based on the configured model training algorithm, train the entity relationship model based on the training text samples.
[0143] Step S2200: Input the text processing model and the prediction text data into the text processing model prediction operator to obtain the prediction labels of the prediction text data.
[0144] The prediction text data can be obtained based on the acquired initial text data. How to obtain it can refer to the above step S2100, and this step S2200 will not be elaborated here.
[0145] The text processing model prediction operator is a tool for providing prediction services for the provided prediction data.
[0146] In the case where the text processing model is a text classification model, the above prediction labels are the prediction text classification results. Here, the text processing model prediction operator is the text classification model prediction operator, for example Figure 3a The "Text Classification Model Prediction Operator" shown in the canvas.
[0147] In the case where the text processing model is an entity extraction model, the above true labels are the true entity information results. Here, the text processing model prediction operator is the entity extraction model prediction operator, for example Figure 3b The "Entity Extraction Model Prediction Operator" shown in the canvas.
[0148] In the case where the text processing model is a relationship extraction model, the above true labels are the true entity relationship results. Here, the text processing model prediction operator is the entity relationship model prediction operator, for example Figure 3c The "Entity Relationship Model Prediction Operator" shown in the canvas.
[0149] In this embodiment, it can be to connect the right output point of the "Text Data Splitting Operator" to the right input end of the "Text Processing Model Prediction Operator" to input the split prediction text data into the "Text Processing Model Prediction Operator"; and connect the output point of the "Text Processing Model Training Operator" to the left input point of the "Text Processing Model Prediction Operator" to input the obtained text processing model into the "Text Processing Model Prediction Operator", and configure the "Text Processing Model Prediction Operator", and then perform the prediction of the prediction text data using the text processing model according to the configuration information. Here, the text processing method in the machine learning platform in this embodiment may further include:
[0150] In response to a trigger operation for a text processing model prediction operator, a second configuration interface for configuring the text processing model prediction operator is provided; so that the text processing model prediction operator can use the trained text processing model to provide prediction labels for prediction text data according to the second configuration information input through the second configuration interface.
[0151] For example, it can be a click operation on the text processing model prediction operator. The electronic device 1000 responds to the click operation and provides a configuration interface for configuring the text processing model prediction operator. At least one of the following configuration items is involved in this configuration interface: an input source configuration item of the text processing model prediction operator, a prediction target value field configuration item.
[0152] As Figure 3a shown in the canvas, continue to connect the right output point of the "text data splitting operator" to the right input point of the "text classification model prediction operator", and also connect the output point of the "text classification model training operator" to the right input point of the "text classification model prediction operator". After completing the configuration of the configuration information and selecting to run, the text classification model prediction operator and the trained text classification model can be used to provide prediction classification results for the prediction text data.
[0153] As Figure 3b shown in the canvas, continue to connect the right output point of the "text data splitting operator" to the right input point of the "entity extraction model prediction operator", and also connect the output point of the "entity extraction model training operator" to the right input point of the "entity extraction model prediction operator". After completing the configuration of the configuration information and selecting to run, the entity extraction model prediction operator and the trained entity extraction model can be used to provide prediction entity information results for the prediction text data.
[0154] As Figure 3c shown in the canvas, continue to connect the right output point of the "text data splitting operator" to the right input point of the "relationship extraction model prediction operator", and also connect the output point of the "relationship extraction model training" operator to the right input point of the "relationship extraction model training operator". After completing the configuration of the configuration information and selecting to run, the relationship extraction model prediction operator and the trained relationship extraction model can be used to provide prediction entity relationship results for the prediction text data.
[0155] Step S2300, input the prediction label and the true label corresponding to the prediction text data into the text processing model evaluation operator to obtain the evaluation index value of the text processing model.
[0156] The text processing model evaluation operator is a tool for evaluating the trained text processing model.
[0157] When the text processing model is a text classification model, the text processing model evaluation operator is a text classification model evaluation operator, for example Figure 3a The "text classification model evaluation operator" shown in the canvas.
[0158] When the text processing model is an entity extraction model, the text processing model evaluation operator is an entity extraction model evaluation operator, for example Figure 3b The "entity extraction model evaluation operator" shown in the canvas.
[0159] When the text processing model is a relationship extraction model, the text processing model evaluation operator is an entity relationship model evaluation operator, for example Figure 3c The "entity relationship model evaluation operator" shown in the canvas.
[0160] In this embodiment, it may be to connect the output point of the "text processing model prediction operator" to the input point of the "text processing model evaluation operator", so as to input the true label and predicted label of the predicted text data into the "text processing model evaluation operator", and configure the "text processing model evaluation operator", and then perform prediction of the predicted text data according to the configuration information. Here, the text processing method in the machine learning platform in this embodiment may further include:
[0161] In response to a trigger operation on the text processing model evaluation operator, provide a third configuration interface for configuring the text processing model evaluation operator; so that the text processing model evaluation operator compares the predicted label with the true label corresponding to the predicted text data according to the third configuration information input through the third configuration interface, and obtains the evaluation index value of the text processing model.
[0162] For example, it may be to perform a click operation on the text processing model evaluation operator, and the electronic device 1000 provides a configuration interface for configuring the text processing model evaluation operator in response to the click operation. The configuration interface involves at least one of the following configuration items: the input source configuration item of the text processing model evaluation operator, the configuration item of the evaluation index.
[0163] The above evaluation indexes are used to measure the quality of the text processing model. The evaluation index may be at least one of Mean Squared Error (MSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), R2, Area Under The Curve (AUC), Recall, Precision, Accuracy, f1, Logloss.
[0164] As Figure 3a shown in the canvas, continue to connect the output point of the "Text Classification Model Prediction Operator" to the input point of the "Text Classification Model Evaluation Operator". After completing the configuration of the configuration information and selecting to run, the evaluation index value of the text classification model can be obtained by using the text classification model evaluation operator for the true classification result and the predicted classification result of the predicted text data.
[0165] As Figure 3b shown in the canvas, continue to connect the output point of the "Entity Extraction Model Prediction Operator" to the input point of the "Entity Extraction Model Evaluation Operator". After completing the configuration of the configuration information and selecting to run, the evaluation index value of the entity extraction model can be obtained by using the entity extraction model evaluation operator for the true entity information result and the predicted entity information result of the predicted text data.
[0166] As Figure 3c shown in the canvas, continue to connect the output point of the "Relationship Extraction Model Prediction Operator" to the input point of the "Relationship Extraction Model Evaluation Operator". After completing the configuration of the configuration information and selecting to run, the evaluation index value of the relationship extraction model can be obtained by using the relationship extraction model evaluation operator for the true entity relationship result and the predicted entity relationship result of the predicted text data.
[0167] Step S2400: Perform corresponding processing on the text processing model according to the evaluation index value.
[0168] In this embodiment, after obtaining the evaluation index value of the text processing model according to the above step S2300, corresponding processing can be performed on the text processing model according to this step S2400 based on the evaluation index value.
[0169] In one example, performing corresponding processing on the text processing model according to the evaluation index value in this step S2400 may include: when the evaluation index value is greater than or equal to the evaluation index threshold, putting the text processing model online for application.
[0170] In another example, performing corresponding processing on the text processing model according to the evaluation index value in this step S2400 may further include: when the evaluation index value is less than the evaluation index threshold, retraining the text processing model based on the text processing model training operator.
[0171] For example, retraining the text processing model based on the text processing model training operator may include: adjusting the hyperparameters for model training in the text processing model training operator, and continuing to train the text processing model based on the adjusted hyperparameters. It may be to reselect the tuning algorithm for generating hyperparameters in the text processing model training operator; and generate new hyperparameters according to the reselected tuning algorithm, and continue to train the text processing model based on the new hyperparameters.
[0172] For another example, adjust the quantity of the training text data, and input the adjusted training text data and its corresponding true labels into the text processing model training operator to continue training the text processing model.
[0173] For another example, continuing to train the text processing model based on the text processing model training operator may further include: adjusting the model training algorithm for training the model in the text processing model training operator, so as to continue training the text processing model according to the adjusted model training algorithm.
[0174] According to the method of the embodiments of the present disclosure, it provides an independent text processing model training operator, a text processing model prediction operator, and a text processing model evaluation operator. The training of the training text data is completed through the text processing model training operator to train a text processing model. The prediction of the prediction text data is completed through the text processing model prediction operator and the text processing model to obtain a prediction result. Moreover, the evaluation of the prediction result is completed through the text processing model evaluation operator to obtain an evaluation result of the text processing model, which can intuitively display the entire process of text processing, enabling users without NLP experience to quickly apply text processing to extract the required information.
[0175] In one embodiment, when the text processing model is a text classification model, the configuration items involved in the first configuration interface further include at least one of the configuration item of the application resource and the configuration item of the text language type corresponding to the text data.
[0176] The application resource may include a CPU and a GPU (Graphics Processing Unit). Here, a CPU model and a GPU model are built in the electronic device 1000, and according to the user's selection, the corresponding model will be used for training.
[0177] The configuration item of the text language type is the configuration of the language for text classification training, and the text language may be Chinese or English.
[0178] According to this embodiment, since it supports both the GPU and CPU modes at the same time, users without GPU resources can also perform model training, prediction, evaluation, and online deployment of text classification, completing the entire process of implementing the NLP text classification ability.
[0179] Moreover, it supports text classification of both Chinese and English texts at the same time. When the user performs text classification model training, they only need to select whether the text added to the training is Chinese text or English text, and the electronic device 1000 will automatically train the most suitable model to meet the business requirements for the user according to the selected language.
[0180] In one embodiment, when the text processing model is an entity extraction model, the input source configuration item in the first configuration interface further involves an option for selecting a text data whitelist. The text data whitelist is a list that defines entity information, where the entity information includes the entity name and its corresponding entity type. For example, the defined entity name is "Apple" and the corresponding entity type is "company". Since the content of the whitelist is obtained through a certain amount of experience accumulation, when training the entity extraction model, the "whitelist" function is incorporated. When the model is applied, it can automatically extract the content in the text that conforms to the settings according to the whitelist. Here, the text processing method in the machine learning platform of the present disclosure further includes:
[0181] Using the entity extraction model training operator, parse the text data whitelist; run the parsed text data whitelist to obtain the entity names and their corresponding entity types defined in the text data whitelist, so that the entity extraction model prediction operator can predict the input prediction text data according to the defined entity names and their corresponding entity types to obtain the predicted entity types of each entity name in the prediction text data.
[0182] In this embodiment, the text data whitelist can be saved in Xml format or Json format. Here, it is necessary to first use the entity extraction model training operator to parse the text data whitelist, and then run the parsed text data whitelist to further obtain the entity names and their corresponding entity types defined in the text data whitelist. For example, the entity type corresponding to the entity name "Apple" in the whitelist obtained by training the entity extraction model is "company". In the subsequent entity extraction model prediction, as long as "Apple" appears in the text data, this entity name will be extracted as the "company" category.
[0183] <Device Embodiment>
[0184] In this embodiment, a text data processing device 4000 in a machine learning platform is provided, as Figure 4 shown, including a model training module 4100, a model prediction module 4200, a model evaluation module 4300, and a model processing module 4400.
[0185] The model training module 4100 is used to input the training text data and its corresponding true labels into the text processing model training operator to train a text processing model.
[0186] The model prediction module 4200 is used to input the text processing model and the prediction text data into the text processing model prediction operator to obtain the prediction labels of the prediction text data.
[0187] The model evaluation module 4300 is configured to input the predicted label and the true label corresponding to the predicted text data into a text processing model evaluation operator to obtain an evaluation metric value of the text processing model.
[0188] The model processing module 4400 is configured to perform corresponding processing on the text processing model according to the evaluation metric value.
[0189] In one embodiment, the text processing model is a text classification model, the true label and the predicted label are text classification results, the text processing model training operator is a text classification model training operator, the text processing model prediction operator is a text classification model prediction operator, and the text processing model evaluation operator is a text classification model evaluation operator;
[0190] Or,
[0191] the text processing model is an entity extraction model, the true label and the predicted label are entity information results, the text processing model training operator is an entity extraction model training operator, the text processing model prediction operator is an entity extraction model prediction operator, and the text processing model evaluation operator is an entity extraction model evaluation operator;
[0192] Or
[0193] the text processing model is a relation extraction model, the true label and the predicted label are entity relation results, the text processing model training operator is a relation extraction model training operator, the text processing model prediction operator is a relation extraction model prediction operator, and the text processing model evaluation operator is a relation extraction model evaluation operator.
[0194] In one embodiment, the apparatus 4000 further includes an acquisition module (not shown in the figure), and the acquisition module is configured to: input the acquired initial text data into a text data splitting operator to split the initial text data into training text data and prediction text data;
[0195] wherein, the training text data is used as the input of the text processing model training operator, and the prediction text data is used as the input of the text processing model prediction operator.
[0196] In one embodiment, the acquisition module is further configured to: provide at least one data import path; import the historical text data from the selected data import path; and save the imported historical text data.
[0197] In one embodiment, the model training module 4100 is further configured to: in response to a configuration operation for the text processing model training operator, provide a first configuration interface for configuring the text processing model training operator; for the text processing model training operator to perform feature engineering processing on the training text data and its corresponding true labels according to the first configuration information input through the first configuration interface to obtain training text samples; and train the text processing model based on the training text samples according to a preset model training algorithm.
[0198] In one embodiment, the first configuration interface involves at least one of the following configuration items: an input source configuration item of the text processing model training operator, a target value field configuration item, a model training algorithm configuration item, a tuning algorithm and its hyperparameter configuration item, and a configuration item for the maximum length of the text data.
[0199] In one embodiment, when the text processing model is the text classification model,
[0200] the configuration items involved in the first configuration interface further include at least one of a configuration item for application resources and a configuration item for the text language type corresponding to the text data.
[0201] In one embodiment, when the text processing model is the entity extraction model,
[0202] a selection item related to the text data whitelist in the input source configuration item;
[0203] wherein, the text data whitelist is a list defining entity information, and the entity information includes an entity name and its corresponding entity type.
[0204] In one embodiment, the model training module 4100 is further configured to: use the entity extraction model training operator to parse the text data whitelist; run the parsed text data whitelist to obtain the entity names and their corresponding entity types defined in the text data whitelist, for the instance extraction model prediction operator to perform prediction on the input prediction text data according to the defined entity names and their corresponding entity types to obtain the predicted entity types of each entity name in the prediction text data.
[0205] In one embodiment, the model prediction module 4200 is further configured to: in response to a trigger operation for the text processing model prediction operator, provide a second configuration interface for configuring the text processing model prediction operator; for the text processing model prediction operator to provide prediction labels for the prediction text data by using the trained text processing model according to the second configuration information input through the second configuration interface.
[0206] In one embodiment, the second configuration interface relates to at least one of the following configuration items: the input source configuration item of the text processing model prediction operator, and the prediction target value field configuration item.
[0207] In one embodiment, the model estimation module 4300 is further configured to: in response to a trigger operation for the text processing model evaluation operator, provide a third configuration interface for configuring the text processing model evaluation operator; so that the text processing model evaluation operator compares the prediction label with the true label corresponding to the prediction text data according to the third configuration information input through the third configuration interface, and obtains the evaluation index value of the text processing model.
[0208] In one embodiment, the third configuration interface relates to at least one of the following configuration items: the input source configuration item of the text processing model evaluation operator, and the configuration item of the evaluation index.
[0209] In one embodiment, the model processing module 4400 is further configured to: in the case where the evaluation index value is greater than or equal to the evaluation index threshold, put the text processing model into online application.
[0210] In one embodiment, the model processing module 4400 is further configured to: in the case where the evaluation index value is less than the evaluation index threshold, retrain the text processing model based on the text processing model training operator.
[0211] In one embodiment, the model processing module 4400 is further configured to: adjust the hyperparameters for model training in the text processing model training operator, and continue to train the text processing model based on the adjusted hyperparameters.
[0212] In one embodiment, the model processing module 4400 is further configured to: reselect the tuning algorithm for generating the hyperparameters in the text processing model training operator; generate new hyperparameters according to the reselected tuning algorithm, and continue to train the text processing model based on the new hyperparameters.
[0213] In one embodiment, the model processing module 4400 is further configured to: adjust the quantity of the training text data, and input the adjusted training text data and its corresponding true labels into the text processing model training operator to continue training the text processing model.
[0214] In one embodiment, the model processing module 4400 is further configured to: adjust the model training algorithm for training the model in the text processing model training operator, so as to continue training the text processing model according to the adjusted model training algorithm.
[0215] <Embodiment of the storage medium>
[0216] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method according to any one of the above method embodiments.
[0217] The present invention may be an apparatus, a method, and / or a computer program product. The computer program product may include a computer-readable storage medium having thereon computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0218] A computer-readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punch card or raised structures in a groove having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed as a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.
[0219] The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to respective computing / processing devices, or may be downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.
[0220] The computer program instructions for carrying out the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state-setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external computer (e.g., through the Internet using an Internet service provider). In some embodiments, by using the state information of the computer-readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the present invention.
[0221] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0222] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, when executed by the processor of the computer or other programmable data processing apparatus, create a means for implementing the functions / acts specified in one or more blocks of the flowchart illustrations and / or block diagrams. These computer-readable program instructions can also be stored in a computer-readable storage medium, which instructions cause a computer, a programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises a manufacture, which includes instructions for implementing various aspects of the functions / acts specified in one or more blocks of the flowchart illustrations and / or block diagrams.
[0223] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process such that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in one or more boxes of the flowchart and / or block diagram.
[0224] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or by combinations of special purpose hardware and computer instructions. As will be apparent to those of ordinary skill in the art, implementations using hardware, implementations using software, and implementations using a combination of software and hardware are equivalent.
[0225] The embodiments of the present invention have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the market, or to enable other ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A method for processing text data in a machine learning platform, comprising: Inputting training text data and its corresponding true labels into a text processing model training operator to train a text processing model; Inputting the text processing model and prediction text data into a text processing model prediction operator to obtain prediction labels for the prediction text data; Inputting the prediction labels and the true labels corresponding to the prediction text data into a text processing model evaluation operator to obtain an evaluation metric value of the text processing model; And, Performing corresponding processing on the text processing model according to the evaluation metric value, The method further includes: In response to a configuration operation on the text processing model training operator, providing a first configuration interface for configuring the text processing model training operator; for the text processing model training operator to perform feature engineering processing on the training text data and its corresponding true labels according to the first configuration information input through the first configuration interface to obtain training text samples; and training a text processing model based on the training text samples according to a preset model training algorithm; In response to a trigger operation on the text processing model prediction operator, providing a second configuration interface for configuring the text processing model prediction operator; for the text processing model prediction operator to provide prediction labels for the prediction text data by using the trained text processing model according to the second configuration information input through the second configuration interface; In response to a trigger operation on the text processing model evaluation operator, providing a third configuration interface for configuring the text processing model evaluation operator; so that the text processing model evaluation operator compares the prediction labels with the true labels corresponding to the prediction text data according to the third configuration information input through the third configuration interface to obtain an evaluation metric value of the text processing model.
2. The method according to claim 1, wherein, The text processing model is a text classification model, the true labels and prediction labels are text classification results, the text processing model training operator is a text classification model training operator, the text processing model prediction operator is a text classification model prediction operator, and the text processing model evaluation operator is a text classification model evaluation operator; Or, The text processing model is an entity extraction model, the true labels and prediction labels are entity information results, the text processing model training operator is an entity extraction model training operator, the text processing model prediction operator is an entity extraction model prediction operator, and the text processing model evaluation operator is an entity extraction model evaluation operator; Or The text processing model is a relation extraction model, the true labels and prediction labels are entity relation results, the text processing model training operator is a relation extraction model training operator, the text processing model prediction operator is a relation extraction model prediction operator, and the text processing model evaluation operator is a relation extraction model evaluation operator.
3. The method according to claim 1, wherein The method further includes the step of obtaining the training text data and the prediction text data based on the acquired initial text data, The step of obtaining the training text data and the prediction text data based on the obtained initial text data includes: Input the obtained initial text data into a text data splitting operator to split the initial text data into training text data and prediction text data; Among them, the training text data is used as the input of the text processing model training operator, and the prediction text data is used as the input of the text processing model prediction operator.
4. The method according to claim 3, wherein Obtaining the historical text data includes: Providing at least one data import path; Importing the historical text data from the selected data import path; and Saving the imported historical text data.
5. The method according to claim 1, wherein, The first configuration interface relates to at least one of the following configuration items: the input source configuration item of the text processing model training operator, the target value field configuration item, the model training algorithm configuration item, the tuning algorithm and its hyperparameter configuration item, and the configuration item of the maximum length of the text data.
6. The method according to claim 5, wherein In the case where the text processing model is the text classification model, The configuration items related to the first configuration interface further include at least one of the configuration item of the application resource and the configuration item of the text language type corresponding to the text data.
7. The method according to claim 5, wherein In the case where the text processing model is the entity extraction model, The selection item related to the text data whitelist in the input source configuration item; Among them, the text data whitelist is a list defining entity information, and the entity information includes the entity name and its corresponding entity type.
8. The method according to claim 7, wherein, The method further includes: Using the entity extraction model training operator to parse the text data whitelist; Running the parsed text data whitelist to obtain the entity names and their corresponding entity types defined in the text data whitelist, so that the entity extraction model prediction operator can predict the predicted entity types of each entity name in the input prediction text data according to the defined entity names and their corresponding entity types.
9. The method according to claim 1, wherein The second configuration interface relates to at least one of the following configuration items: the input source configuration item of the text processing model prediction operator, the prediction target value field configuration item.
10. The method according to claim 1, wherein, The third configuration interface relates to at least one of the following configuration items: the input source configuration item of the text processing model evaluation operator, the configuration item of the evaluation index.
11. The method according to claim 1, wherein, The corresponding processing of the text processing model according to the evaluation index value includes: In the case where the evaluation index value is greater than or equal to the evaluation index threshold, putting the text processing model on the line for application.
12. The method according to claim 1, wherein, The corresponding processing of the text processing model according to the evaluation index value further includes: In the case where the evaluation index value is less than the evaluation index threshold, retraining the text processing model based on the text processing model training operator.
13. The method according to claim 12, wherein, The retraining of the text processing model based on the text processing model training operator includes: Adjusting the hyperparameters for model training in the text processing model training operator and continuing to train the text processing model based on the adjusted hyperparameters.
14. The method according to claim 13, wherein, Adjusting hyperparameters for model training in the text processing model training operator and continuing to train the text processing model based on the adjusted hyperparameters includes: Re-selecting a hyperparameter tuning algorithm for generating the hyperparameters in the text processing model training operator; Generating new hyperparameters according to the re-selected tuning algorithm and continuing to train the text processing model based on the new hyperparameters.
15. The method according to claim 12, wherein, The re-continuing to train the text processing model based on the text processing model training operator further includes: Adjusting the quantity of the training text data and inputting the adjusted training text data and its corresponding true labels into the text processing model training operator to continue training the text processing model.
16. The method according to claim 12, wherein, The re-continuing to train the text processing model based on the text processing model training operator further includes: Adjusting the model training algorithm for training the model in the text processing model training operator to continue training the text processing model according to the adjusted model training algorithm.
17. A text data processing device in a machine learning platform, wherein, Includes: A model training module for inputting training text data and its corresponding true labels into a text processing model training operator to train a text processing model; A model prediction module for inputting the text processing model and prediction text data into a text processing model prediction operator to obtain prediction labels for the prediction text data; A model evaluation module for inputting the prediction labels and true labels corresponding to the prediction text data into a text processing model evaluation operator to obtain evaluation metric values of the text processing model; and, A model processing module for performing corresponding processing on the text processing model according to the evaluation metric values, wherein the model training module is further configured to: In response to a configuration operation on the text processing model training operator, provide a first configuration interface for configuring the text processing model training operator; for the text processing model training operator to perform feature engineering processing on the training text data and its corresponding true labels according to first configuration information input through the first configuration interface to obtain training text samples; and based on a preset model training algorithm, train a text processing model based on the training text samples; The model prediction module is further configured to: In response to a trigger operation on the text processing model prediction operator, provide a second configuration interface for configuring the text processing model prediction operator; for the text processing model prediction operator to provide prediction labels for the prediction text data by using the trained text processing model according to second configuration information input through the second configuration interface; The model estimation module is further configured to: In response to a trigger operation on the text processing model evaluation operator, provide a third configuration interface for configuring the text processing model evaluation operator; so that the text processing model evaluation operator compares the prediction labels and the true labels corresponding to the prediction text data according to third configuration information input through the third configuration interface to obtain evaluation metric values of the text processing model.
18. The apparatus according to claim 17, wherein, The text processing model is a text classification model, the true label and the predicted label are text classification results, the training operator of the text processing model is a text classification model training operator, the prediction operator of the text processing model is a text classification model prediction operator, and the evaluation operator of the text processing model is a text classification model evaluation operator; Or, The text processing model is an entity extraction model, the true label and the predicted label are entity information results, the training operator of the text processing model is an entity extraction model training operator, the prediction operator of the text processing model is an entity extraction model prediction operator, and the evaluation operator of the text processing model is an entity extraction model evaluation operator; Or The text processing model is a relation extraction model, the true label and the predicted label are entity relation results, the training operator of the present processing model is a relation extraction model training operator, the prediction operator of the text processing model is a relation extraction model prediction operator, and the evaluation operator of the text processing model is a relation extraction model evaluation operator.
19. The apparatus according to claim 17, wherein, The device further includes an acquisition module, and the acquisition module is used for: Inputting the obtained initial text data into a text data splitting operator to split the initial text data into training text data and prediction text data; Wherein, the training text data is used as the input of the training operator of the text processing model, and the prediction text data is used as the input of the prediction operator of the text processing model.
20. The apparatus according to claim 19, wherein, The acquisition module is further used for: Providing at least one data import path; Importing the historical text data from the selected data import path; and Saving the imported historical text data.
21. The apparatus according to claim 17, wherein, The first configuration interface relates to at least one of the following configuration items: an input source configuration item of the training operator of the text processing model, a target value field configuration item, a model training algorithm configuration item, a tuning algorithm and its hyperparameter configuration item, and a configuration item of the maximum length of the text data.
22. The apparatus according to claim 21, wherein, When the text processing model is the text classification model, The configuration items related to the first configuration interface further include at least one of an application resource configuration item and a text language type configuration item corresponding to the text data.
23. The apparatus according to claim 21, wherein, When the text processing model is the entity extraction model, A selection item related to a text data whitelist in the input source configuration item; Wherein, the text data whitelist is a list defining entity information, and the entity information includes an entity name and its corresponding entity type.
24. The device according to claim 23, wherein, The model training module is further used for: Using the entity extraction model training operator to parse the text data whitelist; Running the parsed text data whitelist to obtain the entity name and its corresponding entity type defined in the text data whitelist for The instance extraction model prediction operator to perform prediction on the input prediction text data according to the defined entity name and its corresponding entity type to obtain the predicted label of the prediction text data.
25. The apparatus according to claim 17, wherein The second configuration interface relates to at least one of the following configuration items: an input source configuration item of the prediction operator of the text processing model, a prediction target value field configuration item.
26. The device according to claim 17, wherein The third configuration interface relates to at least one of the following configuration items: the input source configuration item of the text processing model evaluation operator, and the configuration item of the evaluation index.
27. The device according to claim 17, wherein the model processing module is further configured to: When the evaluation index value is greater than or equal to the evaluation index threshold, put the text processing model into online application.
28. The device according to claim 17, wherein the model processing module is further configured to: When the evaluation index value is less than the evaluation index threshold, retrain the text processing model based on the operator for training the text processing model.
29. The device according to claim 28, wherein the model processing module is further configured to: Adjust the hyperparameters for model training in the operator for training the text processing model, and continue to train the text processing model based on the adjusted hyperparameters.
30. The device according to claim 29, wherein the model processing module is further configured to: Re-select the hyperparameter tuning algorithm for generating the hyperparameters in the operator for training the text processing model; Generate new hyperparameters according to the re-selected hyperparameter tuning algorithm, and continue to train the text processing model based on the new hyperparameters.
31. The device according to claim 28, wherein the model processing module is further configured to: Adjust the quantity of the training text data, and input the adjusted training text data and its corresponding true labels into the operator for training the text processing model to continue training the text processing model.
32. The device according to claim 28, wherein the model processing module is further configured to: Adjust the model training algorithm for training the model in the operator for training the text processing model, so as to continue training the text processing model according to the adjusted model training algorithm.
33. An apparatus comprising at least one computing device and at least one storage device, wherein, The at least one storage device is used to store instructions for controlling the at least one computing device to execute the method according to any one of claims 1 to 16; or, the device implements the device according to claims 17 to 32 through the computing device and the storage device.
34. A computer-readable storage medium, wherein, A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.
Citation Information
Patent Citations
Method and system for parameter optimization of machine learning algorithm
CN107844837A
Method and system for performing machine learning process for text classification
CN108875045A