Method and apparatus for sending information
By obtaining the category information set and data set of the target terminal, the initial model is trained, which solves the problem of cumbersome preparation for model training in the existing technology, and achieves faster model training and higher accuracy and recall.
Patent Information
- Application Number
- CN201910574826.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-28
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2039-06-28
AI Technical Summary
When applying machine learning to practical problems, a lot of preparation is required, resulting in long-term and inefficient steps such as model selection, data preparation, model training and model testing.
By obtaining the category information set sent by the target terminal, using a machine learning algorithm to train the initial model based on the external and internal data sets, a classification model that meets the predetermined training end condition, and sends the trained model calling interface to the target terminal.
This improves the speed of model training, improves the accuracy and recall of the model, and simplifies the deployment process of the model.
Smart Images

Figure CN110263930B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and more particularly, to a method and apparatus for sending information. Background Art
[0002] Artificial Intelligence (AI) technology is characterized by its wide scope, high technical barriers to entry, and complex processing procedures. In practice, while technologies like machine learning and deep learning have made significant progress, their application to solving real-world problems still requires considerable preparation. For example, choosing the right technology to analyze and process data can take a long time.
[0003] Generally, technicians need to go through the following steps before they can use the model: model selection, data preparation, model training, model testing, model deployment, etc. Summary of the Invention
[0004] The present disclosure proposes a method and apparatus for transmitting information.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for sending information, the method comprising: obtaining a category information set sent by a target terminal as an external category information set; in response to the presence of target external category information in the external category information set, obtaining a target external data set sent by the target terminal and corresponding to the target external category information, using a machine learning algorithm to train an initial model based on the external category information set, the target external data set and the target internal data set, and determining the initial model that meets a predetermined training end condition as a trained classification model, wherein the target external category information is external category information that does not match the internal category information in the predetermined internal category information set, and the target internal data set is an internal data set corresponding to the internal category information that matches the external category information in the external category information set; and sending a calling interface for the trained classification model to the target terminal.
[0006] In some embodiments, whether target external category information exists in the external category information set is determined by performing any of the following steps: for external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set that has a pre-established association relationship with the external category information, it is determined that the target external category information exists in the external category information set; or, for external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set that has a similarity with the external category information greater than or equal to a preset threshold, it is determined that the target external category information exists in the external category information set.
[0007] In some embodiments, the method further includes: in response to the presence of target external category information in the external category information set, performing any of the following: establishing an association relationship between the target external category information and the internal category information in the internal category information set; or, based on the target external category information, updating the internal category information set, and establishing an association relationship between the target external category information and the internal category information in the updated internal category information set.
[0008] In some embodiments, obtaining a target external data set corresponding to target external category information sent by a target terminal includes: obtaining multiple data to be identified sent by the target terminal; determining the external category information corresponding to the data to be identified among the multiple data to be identified from the external category information set to obtain a set of data to be identified corresponding to the target external category information; and determining the set of data to be identified corresponding to the target external category information as the target external data set corresponding to the target external category information.
[0009] In some embodiments, the method further includes: in response to receiving target modification information sent by the target terminal, retraining the initial model using the target external data set, the modified external category information set, and the internal data set corresponding to the internal category information matching the modified external category information, and determining the initial model that meets the predetermined training end conditions as the trained classification model, wherein the target modification information is used to modify the external category information corresponding to the external data or internal data.
[0010] In some embodiments, the method further includes: in response to receiving new external data, determining the external category information corresponding to the new external data from the external category information set, using a machine learning algorithm, using the new external data as input data of the trained classification model, and using the external category information corresponding to the new external data as expected output data of the trained classification model, to train a new classification model.
[0011] In some embodiments, the method further includes: in response to receiving new external data, determining the external category information corresponding to the new external data from the external category information set, using a machine learning algorithm, using the new external data as input data of the trained classification model, and using the external category information corresponding to the new external data as expected output data of the trained classification model, to train a new classification model.
[0012] In some embodiments, a machine learning algorithm is used to train an initial model based on an external category information set, a target external data set, and a target internal data set, and the initial model that meets predetermined training end conditions is determined as the trained classification model, including: obtaining a pre-trained model, wherein the hyperparameters of the pre-trained model are the optimal hyperparameters of the target model in the target model set, and the target model in the target model set is a model obtained by hyperparameter adjustment of the initial model using a hyperparameter adjustment method among a plurality of predetermined hyperparameter adjustment methods; a machine learning algorithm is used to train the pre-trained model based on an external category information set, a target external data set, and a target internal data set, and the pre-trained model that meets predetermined training end conditions is determined as the trained classification model.
[0013] In some embodiments, before sending the calling interface of the trained classification model to the target terminal, the method also includes: in response to the absence of target external category information in the external category information set, determining the pre-trained model as the trained classification model, wherein the pre-trained model is trained based on the internal category information set and the internal data set corresponding to the internal category information in the internal category information set.
[0014] In a second aspect, an embodiment of the present disclosure provides a device for sending information, the device comprising: an acquisition unit, configured to acquire a category information set sent by a target terminal as an external category information set; a training unit, configured to acquire a target external data set corresponding to the target external category information sent by the target terminal in response to the presence of target external category information in the external category information set, and adopt a machine learning algorithm to train an initial model based on the external category information set, the target external data set and the target internal data set, and determine the initial model that meets a predetermined training end condition as the trained classification model, wherein the target external category information is external category information that does not match the internal category information in the predetermined internal category information set, and the target internal data set is an internal data set corresponding to the internal category information that matches the external category information in the external category information set; a first sending unit, configured to send a calling interface of the trained classification model to the target terminal.
[0015] In some embodiments, the training unit determines whether target external category information exists in the external category information set by performing any of the following steps: for the external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set that has a pre-established association relationship with the external category information, it is determined that the target external category information exists in the external category information set; or, for the external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set that has a similarity with the external category information greater than or equal to a preset threshold, it is determined that the target external category information exists in the external category information set.
[0016] In some embodiments, the device also includes: a relationship establishing unit, configured to, in response to the presence of target external category information in the external category information set, further perform any of the following: establishing an association relationship between the target external category information and the internal category information in the internal category information set; or, based on the target external category information, updating the internal category information set, and establishing an association relationship between the target external category information and the internal category information in the updated internal category information set.
[0017] In some embodiments, the training unit includes: an acquisition module, configured to acquire multiple data to be identified sent by the target terminal; a first determination module, configured to determine the external category information corresponding to the data to be identified in the multiple data to be identified from the external category information set, so as to obtain a set of data to be identified corresponding to the target external category information; a second determination module, configured to determine the set of data to be identified corresponding to the target external category information as the target external data set corresponding to the target external category information.
[0018] In some embodiments, the device also includes: a retraining unit, configured to, in response to receiving target modification information sent by the target terminal, use the target external data set, the modified external category information set, and the internal data set corresponding to the internal category information matching the modified external category information to retrain the initial model, and determine the initial model that meets the predetermined training end condition as the trained classification model, wherein the target modification information is used to modify the external category information corresponding to the external data or internal data.
[0019] In some embodiments, the device also includes: a first determination unit, configured to, in response to receiving new external data, determine the external category information corresponding to the new external data from the external category information set, adopt a machine learning algorithm, use the new external data as input data of the trained classification model, and use the external category information corresponding to the new external data as the expected output data of the trained classification model to train a new classification model.
[0020] In some embodiments, the device also includes: a generation unit, configured to generate identification information of the trained classification model; a storage unit, configured to store various storage data in association with each other, wherein each storage data includes at least two of the following: a second sending unit, configured to store identification information of the classification model, the trained classification model, a data set of the trained classification model, and an external category information set, the data in the data set of the trained classification model is one of the following: internal data or external data; based on the storage data received from the target terminal, the storage data found and stored in association with the received storage data is sent to the target terminal.
[0021] In some embodiments, the training unit includes: an acquisition module configured to acquire a pre-trained model, wherein the hyperparameters of the pre-trained model are the optimal hyperparameters of the target model in the target model set, and the target model in the target model set is a model obtained by adjusting the hyperparameters of the initial model using a hyperparameter adjustment method among a plurality of predetermined hyperparameter adjustment methods; a training module configured to use a machine learning algorithm to train the pre-trained model based on an external category information set, a target external data set, and a target internal data set, and determine the pre-trained model that meets the predetermined training end conditions as the trained classification model.
[0022] In some embodiments, the device also includes: a second determination unit, configured to determine a pre-trained model as a trained classification model in response to the absence of target external category information in the external category information set, wherein the pre-trained model is trained based on the internal category information set and the internal data set corresponding to the internal category information in the internal category information set.
[0023] In a third aspect, an embodiment of the present disclosure provides a server for sending information, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement a method as described in any embodiment of the above-mentioned method for sending information.
[0024] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium for sending information, on which a computer program is stored. When the program is executed by a processor, the method of any embodiment of the above-mentioned method for sending information is implemented.
[0025] The embodiments of the present disclosure provide a method and apparatus for sending information, which obtains a category information set sent by a target terminal as an external category information set, and then, in response to the presence of target external category information in the external category information set, obtains a target external data set sent by the target terminal and corresponding to the target external category information, adopts a machine learning algorithm, and trains an initial model based on the external category information set, the target external data set, and the target internal data set, and determines the initial model that meets a predetermined training end condition as the trained classification model, wherein the target external category information is external category information that does not match the internal category information in the predetermined internal category information set, and the target internal data set is an internal data set corresponding to the internal category information that matches the external category information in the external category information set, and finally, sends a calling interface of the trained classification model to the target terminal, thereby improving the speed of model training and helping to improve the accuracy and recall rate of the trained model. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Other features, objects and advantages of the present disclosure will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
[0027] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0028] Figure 2 is a flow chart of an embodiment of a method for sending information according to the present disclosure;
[0029] Figure 3 is a schematic diagram of an application scenario of the method for sending information according to the present disclosure;
[0030] Figure 4 is a flowchart of another embodiment of a method for sending information according to the present disclosure;
[0031] Figures 5A-5F is a schematic diagram of an interaction process of a target terminal according to the method for sending information disclosed herein;
[0032] Figure 6 is a structural diagram of an embodiment of an apparatus for sending information according to the present disclosure;
[0033] Figure 7 It is a structural diagram of a computer system suitable for implementing a server of an embodiment of the present disclosure. DETAILED DESCRIPTION
[0034] The present disclosure will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.
[0035] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0036] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of a method for transmitting information or an apparatus for transmitting information according to an embodiment of the present disclosure can be applied.
[0037] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0038] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send data (e.g., external category information sets). Various client applications can be installed on terminal devices 101, 102, and 103, such as model training applications, video playback software, news and information applications, image processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0039] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, laptop computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0040] The server 105 can be a server that provides various services, such as a backend server that processes data such as external category information sets sent by the terminal devices 101, 102, and 103. The backend server can train a classification model based on the received data such as external category information sets. Afterwards, the server 105 can also feed back the calling interface of the trained classification model to the terminal device. As an example, the server 105 can be a cloud server or a physical server.
[0041] It should be noted that the server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. No specific limitations are given here.
[0042] It should also be noted that the method for sending information provided in the embodiments of the present disclosure can be executed by a server. Accordingly, the various parts (such as various units, subunits, modules, and submodules) included in the apparatus for sending information can be set in the server.
[0043] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the system architecture is merely illustrative. Depending on the implementation requirements, any number of terminal devices, networks, and servers may be provided. When the electronic device on which the method for sending information is running does not need to transmit data with other electronic devices during the execution of the method for sending information, the system architecture may only include the electronic device (e.g., server) on which the method for sending information is running.
[0044] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for sending information according to the present disclosure. The method for sending information includes the following steps:
[0045] Step 201: Acquire a category information set sent by a target terminal as an external category information set.
[0046] In this embodiment, the execution subject of the method for sending information (eg Figure 1 The server shown in FIG. 1 may obtain the category information set sent by the target terminal as the external category information set through a wired connection or a wireless connection.
[0047] The target terminal may be a terminal in communication with the execution subject. The category information in the category information set sent by the target terminal may be used to indicate a category. For example, the category information may be used to indicate any of the following: people, animals, plants, etc.
[0048] The category information in the category information set sent by the target terminal may be used to indicate the category of a video, a category of text, a category of an image, or may also be used to indicate the category of other data.
[0049] Step 202: In response to the presence of target external category information in the external category information set, a target external data set corresponding to the target external category information sent by the target terminal is obtained, and a machine learning algorithm is used to train the initial model based on the external category information set, the target external data set and the target internal data set, and the initial model that meets the predetermined training end conditions is determined as the trained classification model.
[0050] In this embodiment, when there is target external category information in the external category information set, the above-mentioned execution entity can first obtain the target external data set corresponding to the target external category information sent by the above-mentioned target terminal, and then use a machine learning algorithm to train the initial model based on the external category information set, the target external data set and the target internal data set, and determine the initial model that meets the predetermined training end conditions as the trained classification model.
[0051] The target external category information is external category information that does not match the internal category information in the predetermined internal category information set. The internal category information in the internal category information set is used to indicate a predetermined category. As an example, the internal category information in the internal category information set is used to indicate any of the following categories: vehicle, person, plant, etc. The external category information can be used to indicate category information sent by the target terminal. As an example, the external category information can be used to indicate any of the following categories: car, landscape, plant, etc.
[0052] Here, technicians can predefine matching rules to determine whether the internal category information matches the external category information. For example, the matching rule could be "If the internal category information is the same as the external category information, then the internal category information matches the external category information." Thus, the execution entity can determine that the internal category information indicating "plant" matches the external category information that the execution entity can determine to indicate "plant."
[0053] The target internal data set is the internal data set corresponding to the internal category information that matches the external category information in the external category information set. That is, the internal category information corresponds one-to-one with the internal data set. The category of the target external data in the target external data set is the category indicated by the external category information corresponding to the target external data set. The classification model is used to determine the category of the input data from the external category information set.
[0054] It can be understood that, here, each target external data set can correspond to an external category information set, and different target external data sets can correspond to different external category information sets. In practice, the execution subject can pre-store multiple internal data sets and internal category information sets locally or in an electronic device that is communicatively connected to the execution subject. Each internal data set can correspond to an internal category information in the internal category information set, and the internal category information is used to indicate the category of each internal data in the internal data set. In other words, the category of the internal data in the internal data set is the category indicated by the internal category information corresponding to the internal data set.
[0055] The category of the target external data in the target external data set corresponding to the target external category information sent by the target terminal may be the category indicated by the target external category information.
[0056] In some optional implementations of this embodiment, the execution subject may further determine whether the target external category information exists in the external category information set by performing any of the following steps (i.e., step 1 or step 2):
[0057] Step 1: for the external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set that has a pre-established association relationship with the external category information, determine that target external category information exists in the external category information set.
[0058] Here, the execution subject may store an internal category information set locally or in an electronic device that is communicatively connected to the execution subject, and each piece of internal category information in the internal category information set may be stored in association with the external category information. Thus, if it is determined that there is no internal category information in the internal category information set that has a pre-established association with the external category information, the execution subject may determine that the target external category information exists in the external category information set; if each piece of external category information has an internal category information that has a pre-established association with it, the execution subject may determine that the target external category information does not exist in the external category information set.
[0059] Step 2: For the external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set whose similarity with the external category information is greater than or equal to a preset threshold, determine that target external category information exists in the external category information set.
[0060] Here, the execution subject may use various methods to determine the similarity between the external category information and the internal category information, such as Deep Structured Semantic Models (DSSM), cosine similarity, and the like.
[0061] It can be understood that when it is determined that there is no internal category information in the internal category information set whose similarity with the external category information is greater than or equal to the preset threshold, the above-mentioned execution entity can determine that the target external category information exists in the external category information set; when the similarity between each external category information and the internal category information is less than the above-mentioned preset threshold, the above-mentioned execution entity can determine that the target external category information does not exist in the external category information set.
[0062] In some optional implementations of this embodiment, the execution entity may train a classification model using the following steps:
[0063] Step 1: Obtain a training sample set. The training samples in the training sample set include target data and category information of the target data. The target data is either the target external data in the target external data set or the target internal data in the target internal data set. The category information of the target data is the external category information in the external category information set.
[0064] In step 2, a machine learning algorithm is used to train the initial model by taking the target data included in the training samples in the training sample set as input data and the category information corresponding to the input data item as the expected output data, thereby determining the initial model that meets the predetermined training end conditions as the trained classification model.
[0065] The initial model may include various model structures, such as AlexNet, ZFNet, OverFeat, VGG (Visual Geometry Group) Network, etc. As an example, the initial model may be a convolutional neural network. The training termination conditions may include, but are not limited to, at least one of the following: the training duration exceeds a preset duration, the number of training times exceeds a preset number, or a function value calculated based on a predetermined loss function is less than a preset threshold.
[0066] It can be understood that when the initial model does not meet the above training end conditions, algorithms such as gradient descent and back propagation can be used to adjust the model parameters of the initial model.
[0067] In some optional implementations of this embodiment, the above-mentioned execution subject may also use the following steps to train and obtain a classification model:
[0068] The first step is to obtain a pre-trained model. The hyperparameters of the pre-trained model are the optimal hyperparameters of the target model in the target model set, for example, the hyperparameters of the target model with the fastest learning speed in the target model set. The target model in the target model set is the model obtained by adjusting the hyperparameters of the initial model using a hyperparameter adjustment method from a plurality of pre-determined hyperparameter adjustment methods. The hyperparameters may include, but are not limited to, at least one of the following: learning rate, regularization parameter, number of layers in the neural network, number of neurons in each hidden layer, number of learning rounds, size of mini-batch data, encoding method of output neurons, choice of cost function, method of weight initialization, type of neuron activation function, scale of data used for model training, etc. Here, different hyperparameters can be set accordingly for different initial models. The above-mentioned hyperparameter adjustment methods may include at least one of the following: grid search, Bayesian optimization, random search, gradient-based optimization, etc.
[0069] In the second step, a machine learning algorithm is used to train the pre-trained model based on the external category information set, the target external data set and the target internal data set, and the pre-trained model that meets the predetermined training end conditions is determined as the trained classification model.
[0070] Specifically, the above-mentioned execution entity can use the target data as the input data of the pre-trained model, and use the external category information in the external category information set corresponding to the input data as the expected output data of the pre-trained model to train the pre-trained model, so as to determine the pre-trained model that meets the predetermined training end conditions as the trained classification model.
[0071] The initial model may include various model structures, such as AlexNet, ZFNet, OverFeat, VGG (Visual Geometry Group) Network, etc. As an example, the initial model may be a convolutional neural network. The training termination conditions may include, but are not limited to, at least one of the following: the training duration exceeds a preset duration, the number of training times exceeds a preset number, or a function value calculated based on a predetermined loss function is less than a preset threshold.
[0072] It is understandable that when the pre-trained model does not meet the above training end conditions, algorithms such as gradient descent and back propagation can be used to adjust the model parameters of the pre-trained model.
[0073] It should be understood that in this optional implementation, a variety of hyperparameter adjustment methods can be used to train the initial model to obtain multiple target models, and then the optimal (for example, the fastest learning speed) target model is selected from the multiple target models obtained as the pre-trained model, thereby improving the speed of subsequent training to obtain the classification model, or improving at least one of the accuracy and recall rate of the classification model obtained in subsequent training.
[0074] Step 203: Send the calling interface of the trained classification model to the target terminal.
[0075] In this embodiment, after the classification model is trained, the execution subject may deploy the classification model and send a call interface of the trained classification model to the target terminal, wherein the call interface may include an address and a port number for deploying the classification model.
[0076] It can be understood that after the target terminal receives the calling interface, the user can use the trained classification model through the calling interface.
[0077] In practice, deploying a classification model may include the following steps: packaging the classification model, uploading the packaged classification model to a storage device (eg, BOS), and deploying a cluster operating system (eg, matrix).
[0078] It should be understood that the classification model trained in the embodiments of the present disclosure can be applied to scenarios such as face recognition, liveness detection, adverse information monitoring, object monitoring, and scene recognition, thereby achieving the effect of improving work efficiency and reducing labor costs.
[0079] In some optional implementations of this embodiment, when the target external category information exists in the external category information set, the execution entity may further perform any of the following:
[0080] Establish an association relationship between the target external category information and the internal category information in the internal category information set, or, based on the target external category information, update the internal category information set, and establish an association relationship between the target external category information and the internal category information in the updated internal category information set.
[0081] Here, the above-mentioned execution entity can use key-value pairs to establish an association relationship between the target external category information and the internal category information in the internal category information set, or use pointers or indexes to establish an association relationship between the target external category information and the internal category information in the internal category information set.
[0082] In addition, the above-mentioned execution entity can take the target external category information as new internal category information and add it to the internal category information set, thereby establishing an association relationship between the target external category information and the new internal category information in the updated internal category information set, or can take the synonyms of the target external category information as new internal category information and add it to the internal category information set, thereby establishing an association relationship between the target external category information and the new internal category information in the updated internal category information set.
[0083] It can be understood that through this optional implementation method, the above-mentioned execution subject can establish an association relationship between the target external category information and the internal category information in the internal category information set. Afterwards, the technician can add a corresponding internal data set for the newly established internal category information. In practice, the internal category information set is usually data obtained after feature engineering processing. Therefore, the above-mentioned execution subject can train a classification model for users of other user terminals based on the target external category information and internal category information with an established association relationship, or train an existing classification model to obtain a new classification model. Compared with training models using data provided by users, this optional implementation method helps to improve the accuracy of the trained model by establishing the above-mentioned association relationship.
[0084] In some optional implementations of this embodiment, obtaining the target external data set corresponding to the target external category information sent by the target terminal may include the following steps:
[0085] The first step is to obtain multiple data to be identified sent by the target terminal. The data to be identified can be data sent by the user through the target terminal that corresponds to the external category information in the external category information set. For example, the external category information set uploaded by the user can be "people, animals, plants", then the data to be identified can be images containing people objects, images containing animal objects, images containing plant objects, and so on. People objects can be images of people presented in the image, animal images can be images of animals presented in the image, and plant objects can be images of plants presented in the image. It can be understood that the purpose of users uploading external category information sets and data to be identified is usually to train a classification model.
[0086] In the second step, the external category information corresponding to the data to be identified among the plurality of data to be identified is determined from the external category information set to obtain a set of data to be identified corresponding to the target external category information.
[0087] As an example, the execution entity may sequentially input each of the plurality of to-be-recognized data into a pre-trained recognition model to obtain external category information corresponding to the input to-be-recognized data. The recognition model may be used to determine the external category information corresponding to the input to-be-recognized data from a set of external category information.
[0088] As another example, the execution entity may sequentially send each of the multiple data to be identified to the target terminal, and also send a set of external category information to the target terminal. The target terminal may then present the received data to be identified and the set of external category information. The user may then select the external category information corresponding to each data to be identified from the set of external category information presented by the target terminal and return it to the execution entity. Thus, the execution entity may obtain the external category information corresponding to the input data to be identified.
[0089] It can be understood that, since the target external category information belongs to the above-mentioned external category information set, the above-mentioned execution subject can obtain the set of to-be-identified data corresponding to the target external category information.
[0090] In the third step, the set of to-be-identified data corresponding to the target external category information is determined as the target external data set corresponding to the target external category information.
[0091] It can be understood that this optional implementation method can determine the target external data set corresponding to the target external category information from the multiple data to be identified uploaded by the user. Therefore, for other external category information in the external category information set except the target external category information, since it matches the internal category information, the corresponding internal data set can be determined. Therefore, the corresponding internal data set is used to replace the corresponding set of data to be identified to train the classification model, thereby improving the accuracy of the trained classification model.
[0092] In some optional implementations of this embodiment, the above-mentioned execution entity may further perform the following steps:
[0093] Upon receiving target modification information sent by the target terminal, the initial model is retrained using the target external data set, the modified external category information set, and the internal data set corresponding to the internal category information that matches the modified external category information, and the initial model that meets the predetermined training end condition is determined as the trained classification model. The target modification information is used to modify the external category information corresponding to the external data or internal data.
[0094] Here, the execution entity may use the target data as the input data of the initial model and the modified external category information corresponding to the target data as the expected output data of the initial model to retrain the classification model. The target data is the target external data in the target external data set, or the internal data in the internal data set.
[0095] It can be understood that in this optional implementation, the method of retraining the classification model can be basically the same as the method of training the classification model above, and will not be repeated here.
[0096] It should be understood that this optional implementation allows for retraining a classification model that meets the user's new needs after the user modifies the external data or the external category information corresponding to the internal data through the target terminal. This enriches the model training methods and can train classification models that meet the needs of different users. The execution entity can then send a call interface for the retrained classification model to the target user, allowing the user to use the retrained classification model.
[0097] In some optional implementations of this embodiment, the above-mentioned execution entity may further perform the following steps:
[0098] When new external data is received, the external category information corresponding to the new external data is determined from the external category information set, and a machine learning algorithm is used to use the new external data as the input data of the trained classification model, and the external category information corresponding to the new external data as the expected output data of the trained classification model to train a new classification model.
[0099] It is understood that if a user wishes to add new training samples, the user can upload new external data to the target terminal. The target terminal can then send the new external data to the execution entity. The execution entity can then employ a method similar to that described above to determine the external category information corresponding to the new external data from the external category information set. Finally, a machine learning algorithm is employed, using the new external data as input data for the trained classification model and the external category information corresponding to the new external data as the expected output data of the trained classification model. Algorithms such as backpropagation and gradient descent are then used to adjust the model parameters of the classification model, thereby training a new classification model.
[0100] It should be understood that this optional implementation method can use the newly added training samples to continue training the classification model if the user wants to add new training samples, thereby training a new classification model to meet the user's need to train a new classification model based on the new training samples. Afterwards, the above-mentioned execution entity can also send a call interface for the new classification model to the target user for the user to use the new classification model.
[0101] In some optional implementations of this embodiment, the above-mentioned execution entity may further perform the following steps:
[0102] Step 1: Generate identification information of the trained classification model. The identification information can be used to identify the classification model. For example, the identification information can be a timestamp of generating the classification model or a version number of the classification model.
[0103] Step 2: Associate and store various storage data, wherein each storage data includes at least two of the following: identification information of the classification model, the trained classification model, a data set of the trained classification model, and an external category information set, and the data in the data set of the trained classification model is one of the following: internal data or external data.
[0104] Step 3: Based on the storage data received from the target terminal, the storage data found and stored in association with the received storage data is sent to the target terminal.
[0105] It can be understood that since at least two data (i.e., storage data) are associated and stored among the identification information of the classification model, the trained classification model, the data set of the trained classification model, and the external category information set, this optional implementation method can search for other storage data associated with the storage data based on the storage data received from the target terminal. For example, when the above-mentioned execution subject associates and stores the identification information of the classification model, the trained classification model, the data set of the trained classification model, and the external category information set, the above-mentioned execution subject can search for the trained classification model, the data set of the trained classification model, and the external category information set associated and stored with the identification information of the classification model based on the identification information of the classification model received from the target terminal. As a result, the user can be informed of the iteration status of the classification model or the training samples used in the training process, can effectively trace the historical information of the model training, can also help the model to compare during the iteration process, help the user to optimize the training iteration of the model, and guide the model effect to develop in a better direction.
[0106] In some optional implementations of this embodiment, before executing step 203, the execution entity may further execute the following steps:
[0107] In the case that the target external category information does not exist in the external category information set, a pre-trained model is determined as the trained classification model, wherein the pre-trained model is trained based on the internal category information set and the internal data set corresponding to the internal category information in the internal category information set.
[0108] It should be understood that the category information recorded in the embodiments of the present disclosure (including external category information, internal category information, target external category information, target internal category information) is equivalent to the label of data (including external data, internal data, target external data, target internal data).
[0109] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the method for sending information according to this embodiment. Figure 3In an application scenario, server 301 first obtains a category information set ("animation, film, and television, music" in the figure) sent by target terminal 302 as external category information set 303. Server 301 then determines whether target external category information exists in external category information set 303. Target external category information is external category information that does not match any internal category information in a predetermined internal category information set. For example, the internal category information set may be "animation, film, and television, technology." Here, because the external category information "music" does not match any internal category information in the aforementioned internal category information set, server 301 can determine that the target external category information "music" exists in external category information set 303. Server 301 then obtains a target external data set 304 corresponding to the target external category information "music" sent by target terminal 302, and uses a machine learning algorithm to train an initial model 306 based on external category information set 303, target external data set 304, and target internal data set 305. The initial model that meets predetermined training end conditions is determined as the trained classification model 307. The target internal data set 305 is an internal data set corresponding to the internal category information that matches the external category information in the external category information set. Finally, the server 301 sends a call interface 308 of the trained classification model 307 to the target terminal 302 .
[0110] In the existing technology, before using the model, users are usually required to first perform the following steps before they can use the model: model selection, data preparation, model training, model testing, model deployment, etc. The current method of training models is too biased towards the bottom layer and deviates from the actual application scenario. The main focus of the current conventional model training platform is on the implementation of different models and the management of the underlying hardware resources. The principles of different models require users to have a deeper background knowledge of them. In addition, the existing technology only provides management for the model training process, and there is usually no effective management method for training data and test data sets. Furthermore, the existing technology lacks model deployment tools, and the deployment of the model requires the processing of the model output by itself.
[0111] The method provided by the above-mentioned embodiments of the present disclosure obtains a category information set sent by a target terminal as an external category information set, and then, in response to the presence of target external category information in the external category information set, obtains a target external data set sent by the target terminal and corresponding to the target external category information, adopts a machine learning algorithm, and trains an initial model based on the external category information set, the target external data set, and the target internal data set, and determines the initial model that meets a predetermined training end condition as the trained classification model, wherein the target external category information is external category information that does not match the internal category information in the predetermined internal category information set, and the target internal data set is an internal data set corresponding to the internal category information that matches the external category information in the external category information set. Finally, a calling interface of the trained classification model is sent to the target terminal, thereby enabling the user to call the classification model without storing the classification model in the target terminal used by the user, reducing the resource occupation of the target terminal, saving the computing resources of the target terminal, reducing the hardware loss of the target terminal, and improving the speed of model training, which helps to improve the accuracy and recall rate of the trained model.
[0112] Further references Figure 4 , which shows a process 400 of another embodiment of a method for sending information. The process 400 of the method for sending information includes the following steps:
[0113] Step 401: Acquire the category information set sent by the target terminal as the external category information set. Then, execute step 402.
[0114] In this embodiment, step 401 and Figure 2 Step 201 in the corresponding embodiment is basically the same and will not be described again here.
[0115] Step 402: Determine whether the target external category information exists in the external category information set. If yes, execute step 404; if not, execute step 403.
[0116] In this embodiment, the execution subject can adopt Figure 2 The method described in the optional implementation shown is used to determine whether target external category information exists in the external category information set, which will not be described in detail here.
[0117] In step 403, the pre-trained model is determined as the trained classification model. Then, step 406 is executed.
[0118] In this embodiment, the execution entity may determine a pre-trained model as the trained classification model.
[0119] The above pre-trained model can be trained using the following steps:
[0120] First, a training sample set is obtained, wherein the training samples in the training sample set include internal category information in the internal category information set and internal data corresponding to the internal category information.
[0121] Then, a machine learning algorithm is used to take the internal data included in the training samples in the above-mentioned training sample set as the input data of the initial model, and the internal category information corresponding to the input internal data as the expected output data of the initial model, and to train the initial model, so that the initial model that meets the predetermined training end conditions is determined as the trained model.
[0122] The initial model may include various model structures, such as AlexNet, ZFNet, OverFeat, VGG (Visual Geometry Group) Network, etc. As an example, the initial model may be a convolutional neural network. The training termination conditions may include, but are not limited to, at least one of the following: the training duration exceeds a preset duration, the number of training times exceeds a preset number, or a function value calculated based on a predetermined loss function is less than a preset threshold.
[0123] It can be understood that when the initial model does not meet the above training end conditions, the model parameters of the initial model can be adjusted so that the initial model meets the above training end conditions, thereby training to obtain the above model.
[0124] In practice, the above pre-trained model can use algorithms such as Batch Gradient Descent (BGD), Stochastic Gradient Descent (SGD), and Mini-batch Gradient Descent to train the initial model.
[0125] It is understood that if the target external category information does not exist in the external category information set, the execution entity can directly determine the pre-trained model as the trained classification model. Furthermore, because the pre-trained model can be pre-trained based on the internal category information set and the internal data set, in this application scenario, the execution entity does not need to further perform model training to obtain a classification model that meets the user's needs, thereby improving model generation efficiency.
[0126] Step 404: Acquire the target external data set corresponding to the target external category information sent by the target terminal. Then, execute step 405.
[0127] In this embodiment, the above-mentioned execution subject can obtain the target external data set corresponding to the target external category information sent by the target terminal. It can be understood that here, each target external data set can correspond to one external category information, and different target external data sets can correspond to different external category information. In practice, multiple internal data sets and internal category information sets can be pre-stored in the above-mentioned execution subject locally or in an electronic device that is communicatively connected to the above-mentioned execution subject. Each internal data set can correspond to an internal category information in the internal category information set, and the internal category information is used to indicate the category of each internal data in the internal data set. In other words, the category of the internal data in the internal data set is the category indicated by the internal category information corresponding to the internal data set.
[0128] It is understood that the internal category information set and the internal data set corresponding to the internal category information in the internal category information set can be obtained through feature engineering. For example, the internal category information set and the internal data set can be structured data (for example, using a two-dimensional table structure to express the implemented data). This can avoid the data acquisition obstacles faced by users during model training, and avoid users from starting from scratch to conduct high-tech tasks such as algorithm research, solution selection, and parameter tuning, thereby improving model generation efficiency.
[0129] In step 405, a machine learning algorithm is used to train the initial model based on the external category information set, the target external data set, and the target internal data set. The initial model that meets the predetermined training end condition is determined as the trained classification model. Thereafter, step 406 is executed.
[0130] In this embodiment, the execution entity may employ a machine learning algorithm to train an initial model based on the external category information set, the target external data set, and the target internal data set, and determine the initial model that meets a predetermined training termination condition as the trained classification model. The category of the target external data in the target external data set corresponding to the target external category information sent by the terminal may be the category indicated by the target external category information.
[0131] It can be understood that when each external category information in the external category information set is the target external category information, the target internal data set is an empty set. Therefore, the above-mentioned execution subject can directly train a classification model based on the external category information set and the external data set; when some (but not all) of the external category information in the external category information set is the target external category information, the above-mentioned execution subject can train a classification model based on the external category information set and the external data set. In this way, for the external category information in the external category information set that matches the internal category information in the predetermined internal category information set, the above-mentioned execution subject can use the internal data set corresponding to the internal category information that matches the external category information, instead of the external data set corresponding to the external category information, to train the classification model. Therefore, when the target internal data set is a set of data obtained after feature engineering processing, it usually takes less than 10 hours from the above-mentioned execution subject obtaining the external data set and external category information to generating the classification model, thereby improving the speed of model generation while ensuring the accuracy of the trained classification model.
[0132] In some optional implementations of this embodiment, the above-mentioned execution entity may further perform the following steps:
[0133] Upon receiving target modification information sent by the target terminal, a classification model is retrained using the target external data set, the modified external category information set, and the internal data set corresponding to the internal category information that matches the modified external category information. The target modification information is used to modify the external category information corresponding to the external data or internal data.
[0134] Here, the execution entity may use the target data as the input data of the initial model and the modified external category information corresponding to the target data as the expected output data of the initial model to retrain the classification model. The target data is the target external data in the target external data set, or the internal data in the internal data set.
[0135] It can be understood that in this optional implementation, the method of retraining the classification model can be basically the same as the method of training the classification model above, and will not be repeated here.
[0136] It should be understood that this optional implementation allows for retraining a classification model that meets the user's new needs after the user modifies the external data or the external category information corresponding to the internal data through the target terminal. This enriches the model training methods and can train classification models that meet the needs of different users. The execution entity can then send a call interface for the retrained classification model to the target user, allowing the user to use the retrained classification model.
[0137] Step 406: Send the calling interface of the trained classification model to the target terminal.
[0138] In this embodiment, after obtaining the classification model, the execution subject may deploy the classification model and send a call interface of the trained classification model to the target terminal, wherein the call interface may include an address and a port number for deploying the classification model.
[0139] It is understood that after the target terminal receives the call interface, the user can use the trained classification model through the call interface. If the target external category information does not exist in the external category information set, the call interface sent in step 406 is the call interface of the classification model in step 403, that is, the call interface of the pre-trained model; if the target external category information does exist in the external category information set, the call interface sent in step 406 is the call interface of the classification model trained in step 405.
[0140] In practice, deploying a classification model may include the following steps: packaging the classification model, uploading the packaged classification model to a storage device (eg, BOS), and deploying a cluster operating system (eg, matrix).
[0141] It can be understood that the classification model trained by this optional implementation method can be used in scenarios such as classification, detection, and recognition.
[0142] In some optional implementations of this embodiment, the above-mentioned execution entity may further perform the following steps:
[0143] Step 1: Generate identification information of the trained classification model. The identification information can be used to identify the classification model. For example, the identification information can be a timestamp of generating the classification model or a version number of the classification model.
[0144] Step 2: Associate and store various storage data, wherein each storage data includes at least two of the following: identification information of the classification model, the trained classification model, a data set of the trained classification model, and an external category information set, and the data in the data set of the trained classification model is one of the following: internal data or external data.
[0145] Step 3: Based on the storage data received from the target terminal, the storage data found and stored in association with the received storage data is sent to the target terminal.
[0146] It can be understood that since at least two items of data (i.e., storage data) are associated and stored among the identification information of the classification model, the trained classification model, the data set of the trained classification model, and the external category information set, this optional implementation method can search for other storage data associated with the storage data based on the storage data received from the target terminal. For example, when the above-mentioned execution subject stores the identification information of the classification model, the trained classification model, the data set of the trained classification model, and the external category information set in an associated manner, the above-mentioned execution subject can search for the trained classification model, the data set of the trained classification model, and the external category information set stored in association with the identification information of the classification model based on the identification information of the classification model received from the target terminal, thereby allowing the user to know the iteration status of the classification model or the training samples used in the training process.
[0147] It should be noted that, in addition to the above-mentioned contents, the embodiments of the present application may also include Figure 2 The same or similar features and effects of the corresponding embodiments will not be repeated here.
[0148] Please refer to the following Figures 5A-5F , Figures 5A-5F A schematic diagram of the interaction process of a target terminal according to the method for sending information disclosed herein is shown.
[0149] like Figure 5A As shown, in the process of creating a model, the user first inputs the model name "short video classification" and the model category "scene classification" into the target terminal. It can be understood that in this application scenario, the user's requirement is to classify scenes for short videos.
[0150] Afterwards, please refer to Figure 5B , the user uploads a category information set to the target terminal ( Figure 5B"Life, Technology, and Entertainment" in the external category information set). Afterwards, if the target external category information does not exist in the external category information set, the above-mentioned execution subject determines the pre-trained model as the trained classification model. Among them, the target external category information is the external category information that does not match the internal category information in the predetermined internal category information set. The pre-trained model is trained based on a predetermined training sample set. The training samples in the training sample set include the internal category information in the internal category information set and the internal data corresponding to the internal category information. If there is target external category information in the external category information set, the above-mentioned execution subject obtains the target external data set corresponding to the target external category information sent by the target terminal. Then, a machine learning algorithm is used to train the initial model based on the external category information set, the target external data set, and the target internal data set, and the initial model that meets the predetermined training end conditions is determined as the trained classification model. As Figure 5B As shown, if the target external category information exists in the external category information set, the target terminal sends the external data set "Video 1, Video 2, Video 3, Video 4, Video 5, Video 6, Video 7..." to the execution entity. Here, the execution entity can pre-process the external data set (for example, data cleaning, etc.).
[0151] like Figure 5C As shown, for each external data in the external data set, the user selects the external category information of the external data from the external category information set. As a result, the target terminal obtains the target external data set (e.g., Video 1, Video 3, ...) corresponding to the target external category information (the target external category information in Figure 5B is "Life").
[0152] After that, the above execution entity starts training the model, such as Figure 5D As shown, the current remaining time is "10 minutes", indicating that the above execution subject completes the training of the classification model after 10 minutes.
[0153] like Figure 5E As shown, after the classification model is trained, the target terminal presents basic information, test reports (for example, calculation of the accuracy, recall rate, F1 score, etc. of the trained classification model), accuracy analysis of each label (ie, category), and other information.
[0154] Here, when the user is not satisfied with the result indicated by the evaluation information, the user may continue to train or retrain the classification model.
[0155] Finally, if Figure 5F As shown, the target terminal receives the calling interface "http: / / xxx.xx.com / xx:8088" of the trained classification model sent by the above execution entity.
[0156] As you can understand, in the example described in the interactive process diagram above, the user only needs to focus on uploading and annotating data (data management and maintenance) and the service performance of the final deployed model. The user does not need to know the entire training process, the specific implementation of the model, or the model training process. This simplifies the training process for users and improves the efficiency of model generation.
[0157] Optionally, each step described in the embodiments of the present disclosure may be implemented by a single server or a server cluster.
[0158] As an example, the server cluster may include a first server, a second server, and a third server, wherein the first server, the second server, and the third server may be communicatively connected with each other.
[0159] The first server can be configured to manage data sets, model training processes, etc. The trained classification model can be directly used for prediction (i.e., verification, for example, calculating the accuracy, recall, F1 score, etc. of the trained classification model) on the first server.
[0160] The second server may be configured to perform feature engineering processing on a data set (eg, an internal data set, an external data set, etc.).
[0161] The third server may be configured to provide computing and storage capabilities, including increasing computing resources for running model training and providing storage resources for data sets (e.g., internal data sets, external data sets, etc.), data features, etc.
[0162] In addition, logs can be printed for monitoring purposes for each step executed by the server cluster.
[0163] Return below Figure 4 ,from Figure 4 It can be seen that Figure 2 Compared to the corresponding embodiment, process 400 of the method for sending information in this embodiment highlights the step of obtaining a classification model when the target external category information does not exist in the external category information set. Therefore, the solution described in this embodiment enriches the model training methods and increases the speed of model generation. Moreover, when the target internal data set is a set of data obtained through feature engineering, this optional implementation method can improve the accuracy of the trained classification model.
[0164] Further references Figure 6As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for sending information. Figure 2 Corresponding to the method embodiment shown, in addition to the features described below, the device embodiment may also include Figure 2 The same or corresponding features as those in the method embodiment shown, and the Figure 2 The method embodiment shown has the same or corresponding effects. The device can be specifically applied to various electronic devices.
[0165] like Figure 6 As shown, the apparatus 600 for sending information in this embodiment includes: an acquisition unit 601, a training unit 602, and a first sending unit 603. The acquisition unit 601 is configured to acquire a category information set sent by a target terminal as an external category information set; the training unit 602 is configured to, in response to the presence of target external category information in the external category information set, acquire a target external data set corresponding to the target external category information sent by the target terminal, employ a machine learning algorithm, and train an initial model based on the external category information set, the target external data set, and the target internal data set, and determine the initial model that meets a predetermined training end condition as the trained classification model, wherein the target external category information is external category information that does not match the internal category information in the predetermined internal category information set, and the target internal data set is an internal data set corresponding to the internal category information that matches the external category information in the external category information set; and the first sending unit 603 is configured to send a calling interface of the trained classification model to the target terminal.
[0166] In this embodiment, the acquiring unit 601 of the apparatus 600 for sending information may acquire the category information set sent by the target terminal as the external category information set through a wired connection or a wireless connection.
[0167] The target terminal may be a terminal communicatively connected to the apparatus 600. The category information in the category information set sent by the target terminal may be used to indicate a category. For example, the category information may be used to indicate any of the following: people, animals, plants, etc. The category information in the category information set sent by the target terminal may be used to indicate the category of a video, text, image, or other data.
[0168] In this embodiment, when there is target external category information in the external category information set, the above-mentioned training unit 602 can first obtain the target external data set corresponding to the target external category information sent by the above-mentioned terminal, and then use a machine learning algorithm to train the initial model based on the external category information set, the target external data set and the target internal data set, and determine the initial model that meets the predetermined training end conditions as the trained classification model.
[0169] The target external category information is external category information that does not match the internal category information in the predetermined internal category information set. The internal category information in the internal category information set is used to indicate a predetermined category. As an example, the internal category information in the internal category information set is used to indicate any of the following categories: vehicle, person, plant, etc. The external category information can be used to indicate category information sent by the target terminal. As an example, the external category information can be used to indicate any of the following categories: car, landscape, plant, etc.
[0170] In this embodiment, the first sending unit 603 may deploy the classification model after training the classification model, and send a calling interface of the trained classification model to the target terminal, wherein the calling interface may include an address and a port number for deploying the classification model.
[0171] In some optional implementations of this embodiment, the training unit 602 determines whether the target external category information exists in the external category information set by performing any of the following steps: for the external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set that has a pre-established association relationship with the external category information, it is determined that the target external category information exists in the external category information set; or, for the external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set whose similarity with the external category information is greater than or equal to a preset threshold, it is determined that the target external category information exists in the external category information set.
[0172] In some optional implementations of this embodiment, the device 600 also includes: a relationship establishing unit (not shown in the figure) is configured to, in response to the presence of target external category information in the external category information set, also perform any of the following: establish an association relationship between the target external category information and the internal category information in the internal category information set; or, based on the target external category information, update the internal category information set, and establish an association relationship between the target external category information and the internal category information in the updated internal category information set.
[0173] In some optional implementations of this embodiment, the training unit 602 includes: an acquisition module (not shown in the figure) configured to acquire multiple data to be identified sent by the target terminal. A first determination module (not shown in the figure) is configured to determine the external category information corresponding to the data to be identified among the multiple data to be identified from the external category information set, so as to obtain a set of data to be identified corresponding to the target external category information. A second determination module (not shown in the figure) is configured to determine the set of data to be identified corresponding to the target external category information as the target external data set corresponding to the target external category information.
[0174] In some optional implementations of this embodiment, the device 600 also includes: a retraining unit (not shown in the figure) is configured to, in response to receiving target modification information sent by the target terminal, use the target external data set, the modified external category information set and the internal data set corresponding to the internal category information matching the modified external category information to retrain the classification model, wherein the target modification information is used to modify the external data or the external category information corresponding to the internal data.
[0175] In some optional implementations of this embodiment, the device 600 also includes: a first determination unit (not shown in the figure) is configured to, in response to receiving new external data, determine the external category information corresponding to the new external data from the external category information set, adopt a machine learning algorithm, use the new external data as input data of the trained classification model, and use the external category information corresponding to the new external data as the expected output data of the trained classification model to train a new classification model.
[0176] In some optional implementations of this embodiment, the device 600 further includes: a generation unit (not shown in the figure) configured to generate identification information of the trained classification model. A storage unit (not shown in the figure) is configured to store various storage data in association with each other, wherein each storage data includes at least two of the following: identification information of the classification model, a trained classification model, a data set of the trained classification model, and an external category information set, and the data in the data set of the trained classification model is one of the following: internal data or external data. A second sending unit (not shown in the figure) is configured to send the storage data found and stored in association with the received storage data to the target terminal based on the storage data received from the target terminal.
[0177] In some optional implementations of this embodiment, the training unit 602 includes: an acquisition module (not shown in the figure) is configured to acquire a pre-trained model, wherein the hyperparameters of the pre-trained model are the optimal hyperparameters of the target model in the target model set, and the target model in the target model set is a model obtained by adjusting the hyperparameters of the initial model using a hyperparameter adjustment method in a plurality of predetermined hyperparameter adjustment methods. The training module (not shown in the figure) is configured to use a machine learning algorithm to train the pre-trained model based on an external category information set, a target external data set, and a target internal data set, and determine the pre-trained model that meets the predetermined training end condition as the trained classification model.
[0178] In some optional implementations of this embodiment, the device 600 also includes: a second determination unit (not shown in the figure) is configured to determine a pre-trained model as a trained classification model in response to the absence of target external category information in the external category information set, wherein the pre-trained model is trained based on the internal category information set and the internal data set corresponding to the internal category information in the internal category information set.
[0179] The apparatus provided by the above-described embodiments of the present disclosure obtains, via an acquisition unit 601, a category information set sent by a target terminal as an external category information set. Then, in response to the presence of target external category information in the external category information set, a training unit 602 obtains a target external data set corresponding to the target external category information sent by the target terminal. An initial model is trained using a machine learning algorithm based on the external category information set, the target external data set, and the target internal data set. The initial model that meets a predetermined training end condition is determined as the trained classification model. The target external category information is external category information that does not match internal category information in a predetermined internal category information set, and the target internal data set is an internal data set corresponding to internal category information that matches the external category information in the external category information set. Finally, a first sending unit 603 sends a calling interface for the trained classification model to the target terminal. This allows the user to call the classification model without storing the classification model in the target terminal used by the user, thereby reducing resource usage of the target terminal, conserving computing resources of the target terminal, reducing hardware loss of the target terminal, and improving the speed of model training, thereby facilitating improved accuracy and recall of the trained model.
[0180] Reference below Figure 7 , which shows a structural diagram of a server computer system 700 suitable for implementing an embodiment of the present disclosure. Figure 7 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0181] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the system 700 are also stored in the RAM 703. The CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0182] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output section 707 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 708 including a hard disk; and a communication section 709 including a network interface card such as a LAN card or a modem. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 710 as needed, so that computer programs read therefrom can be installed into the storage section 708 as needed.
[0183] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from a removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the method of the present disclosure are performed.
[0184] It should be noted that the computer-readable medium described in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0185] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Python, Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0186] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0187] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units described may also be provided in a processor. For example, they may be described as follows: a processor includes an acquisition unit, a training unit, and a first sending unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the acquisition unit may also be described as a "unit for acquiring a set of category information sent by a target terminal."
[0188] As another aspect, the present disclosure further provides a computer-readable medium, which may be included in the server described in the above embodiment; or may exist independently and not be assembled into the server. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the server, the server: obtains a category information set sent by a target terminal as an external category information set; in response to the presence of target external category information in the external category information set, obtains a target external data set corresponding to the target external category information sent by the target terminal, adopts a machine learning algorithm, and trains an initial model based on the external category information set, the target external data set, and the target internal data set, and determines the initial model that meets a predetermined training end condition as the trained classification model, wherein the target external category information is external category information that does not match the internal category information in the predetermined internal category information set, and the target internal data set is an internal data set corresponding to the internal category information that matches the external category information in the external category information set; and sends a calling interface of the trained classification model to the target terminal.
[0189] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
Claims
1. A method for sending information, comprising: Acquire a category information set sent by a target terminal as an external category information set, wherein the category information in the category information set sent by the target terminal is used to indicate a category of a video, a category of text, or a category of an image; In response to the presence of target external category information in the external category information set, obtaining a target external data set corresponding to the target external category information and sent by the target terminal, employing a machine learning algorithm to train an initial model based on the external category information set, the target external data set, and a target internal data set, and determining the initial model that meets a predetermined training end condition as a trained classification model, wherein the target external category information is external category information that does not match internal category information in a predetermined internal category information set, and the target internal data set is an internal data set corresponding to internal category information that matches the external category information in the external category information set; The calling interface of the trained classification model is sent to the target terminal.
2. The method according to claim 1, wherein Determine whether the target external category information exists in the external category information collection by performing any of the following steps: For the external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set that has a pre-established association relationship with the external category information, determining that target external category information exists in the external category information set; or For external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set whose similarity with the external category information is greater than or equal to a preset threshold, it is determined that target external category information exists in the external category information set.
3. The method according to claim 2, wherein: The method further comprises: In response to the existence of target external category information in the external category information set, any one of the following items is further performed: establishing an association relationship between the target external category information and the internal category information in the internal category information set; or Based on the target external category information, the internal category information set is updated, and an association relationship is established between the target external category information and the internal category information in the updated internal category information set.
4. The method according to claim 1, wherein The acquiring of a target external data set corresponding to the target external category information and sent by the target terminal includes: Acquire multiple data to be identified sent by the target terminal; Determining, from the external category information set, external category information corresponding to the data to be identified among the plurality of data to be identified, to obtain a set of data to be identified corresponding to the target external category information; A set of to-be-identified data corresponding to the target external category information is determined as a target external data set corresponding to the target external category information.
5. The method according to claim 1, wherein The method further comprises: In response to receiving the target modification information sent by the target terminal, the initial model is retrained using the target external data set, the modified external category information set, and the internal data set corresponding to the internal category information matching the modified external category information, and the initial model that meets the predetermined training end conditions is determined as the trained classification model, wherein the target modification information is used to modify the external category information corresponding to the external data or internal data.
6. The method according to claim 1, wherein The method further comprises: In response to receiving new external data, the external category information corresponding to the new external data is determined from the external category information set, and a machine learning algorithm is used to use the new external data as input data of the trained classification model, and the external category information corresponding to the new external data as expected output data of the trained classification model to train a new classification model.
7. The method according to claim 1, wherein The method further comprises: Generate identification information of the trained classification model; storing each storage data in an associated manner, wherein each storage data includes at least two of the following: identification information of the classification model, the trained classification model, a data set of the trained classification model, and an external category information set, wherein the data in the data set of the trained classification model is one of the following: internal data or external data; Based on the storage data received from the target terminal, the storage data found and stored in association with the received storage data is transmitted to the target terminal.
8. The method according to any one of claims 1 to 7, wherein: The method of using a machine learning algorithm to train an initial model based on the external category information set, the target external data set, and the target internal data set, and determining the initial model that meets a predetermined training end condition as the trained classification model, includes: Obtaining a pre-trained model, wherein the hyperparameters of the pre-trained model are optimal hyperparameters of a target model in a target model set, and the target model in the target model set is a model obtained by adjusting the hyperparameters of an initial model using a hyperparameter adjustment method from a plurality of predetermined hyperparameter adjustment methods; The pre-trained model is trained based on the external category information set, the target external data set and the target internal data set using a machine learning algorithm, and the pre-trained model that meets a predetermined training end condition is determined as the trained classification model.
9. A device for sending information, comprising: an acquiring unit configured to acquire a category information set sent by a target terminal as an external category information set, wherein the category information in the category information set sent by the target terminal is used to indicate a category of a video, a category of text, or a category of an image; a training unit configured to, in response to the presence of target external category information in the external category information set, obtain a target external data set corresponding to the target external category information sent by the target terminal, employ a machine learning algorithm to train an initial model based on the external category information set, the target external data set, and a target internal data set, and determine the initial model that meets a predetermined training end condition as a trained classification model, wherein the target external category information is external category information that does not match internal category information in a predetermined internal category information set, and the target internal data set is an internal data set corresponding to internal category information that matches the external category information in the external category information set; The first sending unit is configured to send a calling interface of the trained classification model to the target terminal.
10. The device according to claim 9, wherein The training unit determines whether the target external category information exists in the external category information set by performing any of the following steps: For the external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set that has a pre-established association relationship with the external category information, determining that target external category information exists in the external category information set; or For external category information in the external category information set, in response to determining that there is no internal category information in the internal category information set whose similarity with the external category information is greater than or equal to a preset threshold, it is determined that target external category information exists in the external category information set.
11. The device according to claim 10, wherein The device further comprises: The relationship establishing unit is configured to, in response to the existence of target external category information in the external category information set, further perform any one of the following: establishing an association relationship between the target external category information and the internal category information in the internal category information set; or Based on the target external category information, the internal category information set is updated, and an association relationship is established between the target external category information and the internal category information in the updated internal category information set.
12. The device according to claim 9, wherein The training unit comprises: an acquisition module, configured to acquire a plurality of to-be-identified data sent by the target terminal; A first determining module is configured to determine, from the external category information set, the external category information corresponding to the data to be identified among the plurality of data to be identified, so as to obtain a set of data to be identified corresponding to the target external category information; The second determining module is configured to determine the set of to-be-identified data corresponding to the target external category information as the target external data set corresponding to the target external category information.
13. The device according to claim 9, wherein The device further comprises: A retraining unit is configured to, in response to receiving target modification information sent by the target terminal, use the target external data set, the modified external category information set and the internal data set corresponding to the internal category information matching the modified external category information to retrain the initial model, and determine the initial model that meets the predetermined training end condition as the trained classification model, wherein the target modification information is used to modify the external category information corresponding to the external data or internal data.
14. The device according to claim 9, wherein The device further comprises: The first determination unit is configured to, in response to receiving new external data, determine the external category information corresponding to the new external data from the external category information set, adopt a machine learning algorithm, use the new external data as input data of the trained classification model, and use the external category information corresponding to the new external data as expected output data of the trained classification model to train a new classification model.
15. The device according to claim 9, wherein The device further comprises: a generating unit configured to generate identification information of the trained classification model; A storage unit is configured to store various storage data in an associated manner, wherein the various storage data include at least two of the following: identification information of a classification model, a trained classification model, a data set of the trained classification model, and an external category information set, wherein the data in the data set of the trained classification model is one of the following: internal data or external data; The second sending unit is configured to send, based on the storage data received from the target terminal, the storage data found and stored in association with the received storage data to the target terminal.
16. The device according to any one of claims 9 to 15, wherein: The training unit comprises: an acquisition module configured to acquire a pre-trained model, wherein the hyperparameters of the pre-trained model are optimal hyperparameters of a target model in a target model set, and the target model in the target model set is a model obtained by adjusting the hyperparameters of an initial model using a hyperparameter adjustment method from a plurality of predetermined hyperparameter adjustment methods; The training module is configured to use a machine learning algorithm to train the pre-trained model based on the external category information set, the target external data set and the target internal data set, and determine the pre-trained model that meets the predetermined training end conditions as the trained classification model.
17. A server comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
18. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Open domain-based transfer learning method and system
CN108053030A
Data center cloud target recognition method based on deep learning
CN109858486A
Method and apparatus for transmitting information
CN110288089B
Method and system for generating natural language training data
US20150220511A1