WO2022001233A1 - 基于层次化迁移学习的预标注方法及其相关设备 - Google Patents

基于层次化迁移学习的预标注方法及其相关设备 Download PDF

Info

Publication number
WO2022001233A1
WO2022001233A1 PCT/CN2021/082942 CN2021082942W WO2022001233A1 WO 2022001233 A1 WO2022001233 A1 WO 2022001233A1 CN 2021082942 W CN2021082942 W CN 2021082942W WO 2022001233 A1 WO2022001233 A1 WO 2022001233A1
Authority
WO
WIPO (PCT)
Prior art keywords
scene
type
model
recognition model
data
Prior art date
Application number
PCT/CN2021/082942
Other languages
English (en)
French (fr)
Inventor
张楠
王健宗
瞿晓阳
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022001233A1 publication Critical patent/WO2022001233A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the present application relates to the field of artificial intelligence technology, and in particular, to a pre-labeling method based on hierarchical transfer learning and related equipment.
  • the current method is to directly transfer the model trained in the old scene to the new scene for pre-labeling, and then the personnel will correct the pre-labeling results.
  • the pre-labeling results of the model are poor. , even if it is not available at all.
  • the purpose of the embodiments of the present application is to propose a pre-labeling method based on hierarchical transfer learning and related devices, so as to quickly obtain better pre-labeled data in different scenarios.
  • the embodiment of the present application provides a pre-labeling method based on hierarchical transfer learning, which adopts the following technical solutions:
  • a pre-labeling method based on hierarchical transfer learning comprising the following steps:
  • Clustering a plurality of different scenarios received in advance based on a preset clustering algorithm to obtain a clustering result
  • a first type of scene and a second type of scene are determined according to the clustering result, wherein the first type of scene includes a first scene, and the amount of labeled data in the first scene is larger than any of the second type of scenes.
  • the embodiments of the present application also provide a pre-labeling device based on hierarchical transfer learning, which adopts the following technical solutions:
  • a pre-labeling device based on hierarchical transfer learning comprising:
  • the scene clustering module is used for clustering a plurality of different scenes received in advance based on a preset clustering algorithm to obtain a clustering result;
  • a category determination module configured to determine a first type of scene and a second type of scene according to the clustering result, wherein the first type of scene includes a first scene, and the amount of labeled data in the first scene is larger than the The data volume of the labeled data of any scene in the second type of scene;
  • a first labeling module configured to perform migration learning on the first type of scene based on a preset recognition model, and obtain pre-labeled data and a migration model of each scene in the first type of scene;
  • the second labeling module is configured to perform migration learning on the second type of scene based on the migration model, and obtain pre-labeled data of each scene in the second type of scene.
  • the embodiment of the present application also provides a computer device, which adopts the following technical solutions:
  • a computer device comprising a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the processor executes the computer-readable instructions, the processor implements the steps of the pre-labeling method based on hierarchical transfer learning as described below :
  • Clustering a plurality of different scenarios received in advance based on a preset clustering algorithm to obtain a clustering result, wherein the plurality of different scenarios belong to the same task;
  • a first type of scene and a second type of scene are determined according to the clustering result, wherein the first type of scene includes a first scene, and the amount of labeled data in the first scene is larger than any of the second type of scenes.
  • the embodiments of the present application also provide a computer-readable storage medium, which adopts the following technical solutions:
  • a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, implement the steps of the pre-labeling method based on hierarchical transfer learning as described below :
  • Clustering a plurality of different scenarios received in advance based on a preset clustering algorithm to obtain a clustering result, wherein the plurality of different scenarios belong to the same task;
  • a first type of scene and a second type of scene are determined according to the clustering result, wherein the first type of scene includes a first scene, and the amount of labeled data in the first scene is larger than any of the second type of scenes.
  • the recognition model first performs migration learning in the same type of scenario. Similarly, the recognition model can capture fine-grained knowledge in similar scenarios, and then recognize the better pre-labeled data that the model can output in different scenarios under the same category. After completing the transfer learning of similar scenes of the same category, input the obtained transfer model into scenes of another category, and still be able to capture the coarse-grained knowledge in dissimilar scenes belonging to the same task type, so as to solve the problem in the early stage of model training. In the case of insufficient high-quality labeled data, the cost of model design and development in different scenarios of the same task type is reduced, the effect of pre-labeling is improved, and the computer can efficiently produce effective labeled data.
  • FIG. 1 is an exemplary system architecture diagram to which the present application can be applied;
  • FIG. 2 is a flowchart of an embodiment of a pre-labeling method based on hierarchical transfer learning according to the present application
  • FIG. 3 is a schematic structural diagram of an embodiment of a pre-labeling apparatus based on hierarchical transfer learning according to the present application
  • FIG. 4 is a schematic structural diagram of an embodiment of a computer device according to the present application.
  • the system architecture 100 may include terminal devices 101 , 102 , and 103 , a network 104 and a server 105 .
  • the network 104 is a medium used to provide a communication link between the terminal devices 101 , 102 , 103 and the server 105 .
  • the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
  • the user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages and the like.
  • Various communication client applications may be installed on the terminal devices 101 , 102 and 103 , such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, and the like.
  • the terminal devices 101, 102, and 103 may be various electronic devices that have a display screen and support web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic Picture Experts Compression Standard Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) Players, Laptops and Desktops, etc.
  • MP3 players Moving Picture Experts Group Audio Layer III, dynamic Picture Experts Compression Standard Audio Layer 3
  • MP4 Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4
  • the server 105 may be a server that provides various services, such as a background server that provides support for the pages displayed on the terminal devices 101 , 102 , and 103 .
  • the pre-labeling method based on hierarchical transfer learning provided by the embodiments of the present application is generally executed by a server/terminal device, and accordingly, the pre-labeling device based on hierarchical transfer learning is generally set in the server/terminal device.
  • terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
  • the pre-labeling method based on hierarchical transfer learning includes the following steps:
  • S1 Clustering multiple different scenarios received in advance based on a preset clustering algorithm to obtain a clustering result, wherein the multiple different scenarios belong to the same task.
  • the classification of scenes is realized, and similar scenes are determined, which is convenient for subsequent transfer learning of similar scenes to ensure that similar scenes can be captured.
  • Fine-grained knowledge in which, the same task refers to the same task type of the model for different scenes. For example, the current task is intent recognition, then the model's tasks for different scenes are all intent recognition.
  • the electronic device for example, the server/terminal device shown in FIG. 1
  • the pre-labeling method based on hierarchical transfer learning runs can receive multiple different scenarios in advance through wired connection or wireless connection .
  • the above wireless connection methods may include but are not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or developed in the future .
  • the clustering of multiple different scenarios received in advance is performed based on a preset clustering algorithm, and the steps of obtaining the clustering results include:
  • the scene vectors are clustered based on an unsupervised K-means algorithm to obtain a clustering result.
  • the scene text specifically refers to the text data in the scene.
  • the content of the dialogue between the external robot and the customer is the scene text of the scene.
  • the scene text can be adaptively selected and adjusted according to the actual needs and the performance of the model, for example, the description text of the scene is selected as the scene text.
  • the vector model is Doc2vec, which is an unsupervised algorithm that can obtain the vector representation of sentences/paragraphs/texts.
  • the scene text is converted into a scene vector through the vector model, which is convenient for clustering the scene vector through an algorithm, and then realizes the scene clustering.
  • the step of inputting the plurality of different scene texts into a pre-trained vector model, respectively obtaining scene vectors includes:
  • the first text feature vector and the second text feature vector are assembled to obtain the scene vector.
  • Doc2vec includes two kinds of networks: Distributed Memory (DM) and Distributed Bag of Words (DBOW).
  • a scene vector is obtained by assembling the first text feature vector and the second text feature vector.
  • the first text feature vector output by the classification memory network is (p1, p2, p3, p4)
  • the second text feature vector output by the bag-of-words network is (q1, q2, q3, q4)
  • the scene vector is (p1 , p2, p3, p4, q1, q2, q3, q4).
  • S2 Determine a scene of the first type and a scene of the second type according to the clustering result, wherein the scene of the first type includes a scene of the first type, and the amount of labeled data in the scene of the first type is larger than the scene of the second type The amount of labeled data for any scene in the .
  • a plurality of different scenes are divided into different categories through clustering.
  • the category of the scene the first category scene and the second category scene are determined.
  • the first type of scene and the second type of scene do not specifically refer to a certain category of scenes, but refer to any category in general.
  • the category of the selected scene can be determined according to actual needs, for example, A category with more corresponding scenes is selected as the first category of scenes, or a category with pre-identified scenes with a high level of importance is selected as the first category of scenes. Wherein, if the importance level exceeds the preset level threshold, it is determined that the importance level is high.
  • the recognition model trained by the first scene will not be greatly changed in the subsequent training process, and it is ensured that there is enough labeled data in the first scene for training the recognition model. In other words, due to the large amount of labeled data in the first scene, it is suitable as the first scene for training the recognition model.
  • the recognition model trained in the first scene is initially migrated to other scenes, only other scenes are required.
  • the recognition model can be fine-tuned with a small amount of labeled data in , and a better recognition model can be obtained.
  • S3 Perform migration learning on the first type of scene based on a preset recognition model, and obtain pre-labeled data and a migration model of each scene in the first type of scene.
  • the scenes belong to similar scenes
  • the first type of scene is migrated and learned by using a preset recognition model, so that the model can first perform migration learning on similar scenes, which can ensure that the recognition model can capture Fine-grained knowledge in similar scenarios, and output better pre-labeled data.
  • the first type of scene includes at least a first scene and a second scene
  • the first type of scene is subjected to migration learning based on a preset recognition model to obtain a pre-label of each scene in the first type of scene.
  • the steps to migrate data and models include:
  • next scene is learned by the third recognition model until the number of scenes that the recognition model has learned is equal to the number of scenes included in the first type of scene, and the migration model is obtained. and pre-labeled data for each scene in the first category of scenes.
  • the labeled data in the first scene is used as the input of the recognition model, where the labeled data refers to high-quality labeled data selected by relevant personnel.
  • the recognition model of this application is an NLP (Natural Language Processing, natural language processing) model.
  • the recognition model is trained through the high-quality labeled data in the first scene.
  • the loss function of the recognition model can use the cross-entropy loss function.
  • the cross-entropy loss function is used to characterize the real sample labels and prediction probability When the accuracy of the recognition model reaches the preset accuracy threshold, it is determined that the training is completed, and the first recognition model is obtained.
  • the data volume of the labeled data in the first scene needs to be larger than that of the labeled data in the second scene amount to ensure that the model does not change too much in the second scene.
  • the unlabeled data in the first scene can be directly labeled.
  • the recognition model For subsequent pre-labeling of other scenes, it is only necessary to adjust the recognition model through a small amount of labeled data in each scene in turn, which can be used for the pre-labeling of the corresponding scene. Since the scenes are similar and the models are adjusted, the output pre-labeling The data quality is high, which effectively realizes the rapid acquisition of a large number of high-quality pre-labeled data in different scenarios.
  • the step of adjusting the first recognition model based on the labeled data contained in the second scene, and obtaining the second recognition model includes:
  • the to-be-adjusted layer is trained based on the labeled data included in the second scene to obtain an adjustment layer;
  • the fixed layer and the adjustment layer are combined to obtain the second recognition model.
  • the fixed layer is the first n layers of the first recognition model
  • the to-be-adjusted layer is the last m layers of the first recognition model, where n and m are both positive integers.
  • the fixed layer and the layer to be adjusted constitute the first recognition model.
  • Using the labeled data in the second scene to train the layers to be adjusted means fixing the parameters of the first layers of the first model, and using the labeled data in the second scene to train only the parameters of the last layers of the first recognition model.
  • the second recognition model that learns the features in the second scene is achieved by fine-tuning.
  • the training process of training the second recognition model with the above-mentioned first labeling result and obtaining the third recognition model corresponding to the second scene can be either training and iterating all parameters of the second recognition model, or The second recognition model may be adjusted, that is, only the to-be-adjusted layer of the second recognition model is trained.
  • the step of correcting the pre-labeled data and obtaining the labeling result includes:
  • S4 Perform migration learning on the second type of scene based on the migration model, and obtain pre-labeled data of each scene in the second type of scene.
  • the transfer model is obtained. Transfer learning for the second type of scene based on the transfer model
  • the second type of scene includes at least a third scene
  • the step of performing migration learning on the second type of scene based on the migration model, and obtaining pre-labeled data of each scene in the second type of scene includes:
  • next scene is learned by the second transfer model until the number of scenes that the transfer model has learned is equal to the number of scenes included in the second type of scene, and the second type of scene is obtained.
  • the migration model is adjusted through the labeling data in the third scenario.
  • the step of adjusting the migration model based on the annotation data included in the third scene to obtain the first migration model and the above-mentioned adjusting the first recognition model based on the annotation data included in the second scene, obtaining The steps of the second identification model are the same, and are not repeated here.
  • the fixed layer is the first n layers of the first recognition model
  • the to-be-adjusted layer is the last m layers of the first recognition model.
  • the fixed layers are the first k layers of the migration model
  • the layers to be adjusted are the last h layers of the migration model.
  • the above-mentioned process of training the first migration model through the second annotation result and obtaining the second migration model corresponding to the third scene can be either training and iterating all parameters of the first migration model, or The first migration model may be adjusted, that is, only the to-be-adjusted layer of the first migration model needs to be trained.
  • the present application can be applied to a variety of different pre-labeling scenarios.
  • the task type can include gift-giving dialogue scenarios, item sales dialogue scenarios, and after-sales dialogue scenarios.
  • the gift-giving dialogue scene and the item sales dialogue scene are classified into the above-mentioned first type of scene, and the after-sale dialogue scene is classified into the above-mentioned second type of scene.
  • the gift-giving dialogue scene contains a large amount of high-quality intent annotation data
  • the item sales dialogue scene and the after-sales dialogue scene have only a small amount of high-quality intent annotation data
  • the above solution of the present application can effectively obtain items.
  • a large amount of high-quality intent annotation data corresponding to sales dialogue scenarios and after-sales dialogue scenarios.
  • the recognition model first performs migration learning in the same type of scenario. Similarly, the recognition model can capture fine-grained knowledge in similar scenarios, and then recognize the better pre-labeled data that the model can output in different scenarios under the same category. After completing the transfer learning of similar scenes of the same category, input the obtained transfer model into scenes of another category, and still be able to capture the coarse-grained knowledge in dissimilar scenes belonging to the same task type, so as to solve the problem in the early stage of model training. In the case of insufficient high-quality labeled data, the cost of model design and development in different scenarios of the same task type is reduced, the effect of pre-labeling is improved, and the computer can efficiently produce effective labeled data.
  • the pre-labeled data of each of the above scenarios can also be stored in a node of a blockchain.
  • the blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.
  • the present application provides an embodiment of a pre-labeling device based on hierarchical transfer learning, which is similar to the method embodiment shown in FIG. 2 .
  • the apparatus can be specifically applied to various electronic devices.
  • the pre-labeling apparatus 300 based on hierarchical transfer learning described in this embodiment includes: a scene clustering module 301 , a category determination module 302 , a first labeling module 303 and a second labeling module 304 .
  • the scene clustering module 301 is used for clustering a plurality of different scenes received in advance based on a preset clustering algorithm to obtain a clustering result
  • the category determining module 302 is used for determining the first clustering result according to the clustering result.
  • a type of scene and a second type of scene wherein the first type of scene includes a first scene, and the data volume of the annotation data in the first type of scene is greater than the data volume of the annotation data of any scene in the second type of scene;
  • the first labeling module 303 is used to perform migration learning on the first type of scene based on the preset recognition model, and obtain the pre-labeled data and the migration model of each scene in the first type of scene;
  • the second labeling module 304 is used for Perform migration learning on the second type of scene based on the migration model to obtain pre-labeled data of each scene in the second type of scene.
  • the application performs clustering on a plurality of different scenarios under the same task type, obtains clustering results, and realizes the division of scenarios according to the clustering results, and the preset recognition model is first in the same type of scenario.
  • the recognition model can capture fine-grained knowledge in similar scenes, and then recognize the better pre-labeled data that the model can output in different scenes under the same category.
  • After completing the transfer learning of similar scenes of the same category input the obtained transfer model into scenes of another category, and still be able to capture the coarse-grained knowledge in dissimilar scenes belonging to the same task type, so as to solve the problem in the early stage of model training.
  • the cost of model design and development in different scenarios of the same task type is reduced, the effect of pre-labeling is improved, and the computer can efficiently produce effective labeled data.
  • the scene clustering module 301 includes a receiving sub-module, an input sub-module and a clustering sub-module.
  • the receiving sub-module is used for receiving a plurality of different scene texts, wherein the scene texts are in one-to-one correspondence with the scenes;
  • the input sub-module is used for inputting the plurality of different scene texts into the pre-trained vector model respectively, The scene vectors are obtained respectively;
  • the clustering sub-module is used for clustering the scene vectors based on the unsupervised K-means algorithm to obtain the clustering result.
  • the input sub-module includes an input unit and an assembly unit.
  • the input unit is used to sequentially input each of the scene texts into the classification memory network and the bag-of-words network in the pre-trained vector model, respectively, to obtain the first text feature vector and the second text feature vector;
  • the assembly unit is used to assemble all the The first text feature vector and the second text feature vector are obtained to obtain the scene vector.
  • the first type of scene at least includes a first scene and a second scene
  • the first labeling module 303 includes a first training sub-module, a first adjustment sub-module, a first correction sub-module, a first acquisition sub-module, and a first judgment sub-module. module, a first equal submodule, and a first termination submodule.
  • the first training submodule is used to train a preset recognition model based on the labeling data included in the first scene, and obtain a first recognition model, wherein the first scene includes the corresponding labeling data;
  • the first adjustment submodule uses Adjusting the first recognition model based on the labeled data contained in the second scene to obtain a second recognition model, wherein the second scene includes corresponding labeled data and unlabeled data;
  • the first correction sub-module is used for Input the unlabeled data contained in the second scene into the second recognition model, obtain pre-labeled data corresponding to the second scene, and correct the pre-labeled data to obtain the first labeling result;
  • the first obtaining sub-module Used to train the second recognition model through the first labeling result, and obtain the third recognition model corresponding to the second scene;
  • the first judgment sub-module is used to judge the number of scenes that the recognition model has learned and the Whether the number of scenes contained in a type of scene is equal;
  • the first equality sub-module
  • the first adjustment sub-module includes a dividing unit, a training unit and a combining unit.
  • the dividing unit is used to divide the first recognition model into a fixed layer and a layer to be adjusted according to a preset dividing position;
  • the training unit is used to train the layer to be adjusted based on the labeling data contained in the second scene, and obtain Adjustment layer;
  • the combining unit is used for combining the fixed layer and the adjustment layer to obtain the second recognition model.
  • the first correction sub-module includes a display unit, a notification unit and a labeling unit.
  • the display unit is used to display the pre-labeled data corresponding to the second scene on the preset front-end page;
  • the notification unit is used to send a correction notice to the relevant personnel to notify the relevant personnel to correct the said front-end page.
  • the labeling unit is configured to obtain the corrected pre-labeled data of the relevant personnel as the labeling result after receiving the correction completion notification returned by the relevant personnel.
  • the second type of scene includes at least the third scene, and the second labeling module 304 includes a second adjustment sub-module, a second correction sub-module, a second obtaining sub-module, a second judging sub-module, a second equality sub-module and a second sub-module. Terminate submodules.
  • the second adjustment sub-module is configured to adjust the migration model based on the labeled data included in the third scene to obtain a first migration model, wherein the third scene includes corresponding labeled data and unlabeled data; the second correction The sub-module is configured to pre-label the unlabeled data contained in the third scene through the first migration model, obtain pre-labeled data corresponding to the third scene, and correct the pre-labeled data to obtain a second labeling result;
  • the second obtaining sub-module is used to train the first migration model through the second annotation result, and obtain the second migration model corresponding to the third scene;
  • the second judging sub-module is used to judge the number of scenes that the migration model has learned Whether the number of scenes contained in the second type of scene is equal; the second equality sub-module is used to determine whether the number of scenes that the transfer model has learned is equal to the number of scenes contained in the second type of scene.
  • the second termination sub-module is used when the number of scenes that the transfer model has learned is equal to the number of scenes included in the second type of scene.
  • the second migration model uses the second migration model to learn the next scene until the number of scenes that the migration model has learned is equal to the number of scenes included in the second type of scene, and the second type of scene is obtained.
  • the recognition model first performs migration learning in the same type of scenario. Similarly, the recognition model can capture fine-grained knowledge in similar scenarios, and then recognize the better pre-labeled data that the model can output in different scenarios under the same category. After completing the transfer learning of similar scenes of the same category, input the obtained transfer model into scenes of another category, and still be able to capture the coarse-grained knowledge in dissimilar scenes belonging to the same task type, so as to solve the problem in the early stage of model training. In the case of insufficient high-quality labeled data, the cost of model design and development in different scenarios of the same task type is reduced, the effect of pre-labeling is improved, and the computer can efficiently produce effective labeled data.
  • FIG. 4 is a block diagram of a basic structure of a computer device according to this embodiment.
  • the computer device 200 includes a memory 201 , a processor 202 , and a network interface 203 that communicate with each other through a system bus. It should be noted that only the computer device 200 with components 201-203 is shown in the figure, but it should be understood that implementation of all shown components is not required, and more or less components may be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, special-purpose Integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • DSP Digital Signal Processor
  • the computer equipment may be a desktop computer, a notebook computer, a palmtop computer, a cloud server and other computing equipment.
  • the computer device can perform human-computer interaction with the user through a keyboard, a mouse, a remote control, a touch pad or a voice control device.
  • the memory 201 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static Random Access Memory (SRAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Programmable Read Only Memory (PROM), Magnetic Memory, Magnetic Disk, Optical Disk, etc.
  • the memory 201 may be an internal storage unit of the computer device 200 , such as a hard disk or a memory of the computer device 200 .
  • the memory 201 may also be an external storage device of the computer device 200, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc.
  • the memory 201 may also include both the internal storage unit of the computer device 200 and its external storage device.
  • the memory 201 is generally used to store the operating system and various application software installed on the computer device 200 , such as computer-readable instructions based on a pre-labeling method based on hierarchical transfer learning.
  • the memory 201 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 202 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips.
  • the processor 202 is typically used to control the overall operation of the computer device 200 .
  • the processor 202 is configured to execute computer-readable instructions stored in the memory 201 or process data, for example, computer-readable instructions for executing the pre-labeling method based on hierarchical transfer learning.
  • the network interface 203 may include a wireless network interface or a wired network interface, and the network interface 203 is generally used to establish a communication connection between the computer device 200 and other electronic devices.
  • the present application also provides another implementation manner, which is to provide a computer-readable storage medium, where the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor, so that the at least one processor executes the above-mentioned pre-labeling method based on hierarchical transfer learning. step.
  • the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
  • a storage medium such as ROM/RAM, magnetic disk, CD-ROM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Medical Informatics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例属于人工智能领域,涉及一种基于层次化迁移学习的预标注方法及其相关设备,包括基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果;根据聚类结果确定第一类场景和第二类场景,第一类场景包括第一场景,第一场景中标注数据的数据量大于第二类场景中任意场景的标注数据的数据量;基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型;基于迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据。其中,每个场景的预标注数据可存储于区块链中。本申请实现快速获得不同场景中较好的预标注数据。

Description

基于层次化迁移学习的预标注方法及其相关设备
本申请要求于2020年11月27日提交中国专利局、申请号为202011364408.9,发明名称为“基于层次化迁移学习的预标注方法及其相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及基于层次化迁移学习的预标注方法及其相关设备。
背景技术
随机科技的发展,智能化的识别技术已经得到广泛的应用,许多数据不再需要人员来标注,而是通过模型可以直接进行预标注,人员只需要矫正预标注的结果即可,有效的减少了人工成本和标注时间。
但是,目前在模型实际投入使用,进行预标注之前,需要大量的已经标注的数据对模型进行训练,模型训练的效果直接影响预标注的结果。然而,发明人意识到,在对不同场景的模型进行训练时,依然需要人员来对每个场景中的大量数据分别进行标注,造成人工成本过高,标注速度过慢,无法在短期内快速获得不同场景中的大量较好的标注数据。
目前的方式是将旧场景中训练好的模型直接迁移到新场景中进行预标注,再由人员矫正预标注结果,但由于不同的场景可能存在较大的差异,导致模型的预标注结果较差,甚至根本无法使用的情况。
发明内容
本申请实施例的目的在于提出一种基于层次化迁移学习的预标注方法及其相关设备,实现快速获得不同场景中较好的预标注数据。
为了解决上述技术问题,本申请实施例提供一种基于层次化迁移学习的预标注方法,采用了如下所述的技术方案:
一种基于层次化迁移学习的预标注方法,包括下述步骤:
基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果;
根据所述聚类结果确定第一类场景和第二类场景,其中,所述第一类场景包括第一场景,所述第一场景中标注数据的数据量大于所述第二类场景中任意场景的标注数据的数据量;
基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型;
基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据。
为了解决上述技术问题,本申请实施例还提供一种基于层次化迁移学习的预标注装置,采用了如下所述的技术方案:
一种基于层次化迁移学习的预标注装置,包括:
场景聚类模块,用于基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果;
类别确定模块,用于根据所述聚类结果确定第一类场景和第二类场景,其中,所述第一类场景包括第一场景,所述第一场景中标注数据的数据量大于所述第二类场景中任意场景的标注数据的数据量;
第一标注模块,用于基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型;
第二标注模块,用于基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类 场景中每个场景的预标注数据。
为了解决上述技术问题,本申请实施例还提供一种计算机设备,采用了如下所述的技术方案:
一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现如下所述的基于层次化迁移学习的预标注方法的步骤:
基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果,其中,所述多个不同的场景属于同一任务;
根据所述聚类结果确定第一类场景和第二类场景,其中,所述第一类场景包括第一场景,所述第一场景中标注数据的数据量大于所述第二类场景中任意场景的标注数据的数据量;
基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型;
基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据。
为了解决上述技术问题,本申请实施例还提供一种计算机可读存储介质,采用了如下所述的技术方案:
一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下所述的基于层次化迁移学习的预标注方法的步骤:
基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果,其中,所述多个不同的场景属于同一任务;
根据所述聚类结果确定第一类场景和第二类场景,其中,所述第一类场景包括第一场景,所述第一场景中标注数据的数据量大于所述第二类场景中任意场景的标注数据的数据量;
基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型;
基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据。
与现有技术相比,本申请实施例主要有以下有益效果:
本申请在相同任务类型下,对多个不同的场景进行聚类,获得聚类结果,并根据聚类结果实现场景的划分,预设的识别模型先在同一类场景中进行迁移学习,由于场景相似,识别模型能够捕获相似场景下的细粒度的知识,进而识别模型在同一类下的不同场景中能够输出的较好的预标注数据。完成同一类的相似场景的迁移学习后,将获得的迁移模型输入另一类的场景中,依然能够捕获属于同任务类型下,不相似场景中的粗粒度的知识,从而能够解决在模型训练早期高质量的标注数据不足的情况,减少相同任务类型中不同场景下模型设计和开发的成本,提高预标注的效果,保证计算机能够高效的产出有效的标注数据。
附图说明
为了更清楚地说明本申请中的方案,下面将对本申请实施例描述中所需要使用的附图作一个简单介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请可以应用于其中的示例性系统架构图;
图2是根据本申请的基于层次化迁移学习的预标注方法的一个实施例的流程图;
图3是根据本申请的基于层次化迁移学习的预标注装置的一个实施例的结构示意图;
图4是根据本申请的计算机设备的一个实施例的结构示意图。
附图标记:200、计算机设备;201、存储器;202、处理器;203、网络接口;300、基于层次化迁移学习的预标注装置;301、场景聚类模块;302、类别确定模块;303、第一标注模块;304、第二标注模块。
具体实施方式
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同;本文中在申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请;本申请的说明书和权利要求书及上述附图说明中的术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。本申请的说明书和权利要求书或上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
为了使本技术领域的人员更好地理解本申请方案,下面将结合附图,对本申请实施例中的技术方案进行清楚、完整地描述。
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如网页浏览器应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。
终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103上显示的页面提供支持的后台服务器。
需要说明的是,本申请实施例所提供的基于层次化迁移学习的预标注方法一般由服务器/终端设备执行,相应地,基于层次化迁移学习的预标注装置一般设置于服务器/终端设备中。
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。
继续参考图2,示出了根据本申请的基于层次化迁移学习的预标注方法的一个实施例的流程图。所述的基于层次化迁移学习的预标注方法,包括以下步骤:
S1:基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果,其中,所述多个不同的场景属于同一任务。
在本实施例中,通过对多个不同的场景进行聚类,从而实现对场景的分类,确定出相似的场景,便于后续先对相似场景的进行迁移学习,以保证可以捕获到相似场景下的细粒度知识,其中,同一任务指模型对不同场景的任务类型是一样的,比如当前任务是意图识别,则模型对不同场景的任务均为意图识别。
在本实施例中,基于层次化迁移学习的预标注方法运行于其上的电子设备(例如图1所示的服务器/终端设备)可以通过有线连接方式或者无线连接方式预先接收多个不同的 场景。需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。
具体的,所述基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果的步骤包括:
接收多个不同的场景文本,其中,所述场景文本与所述场景一一对应;
将所述多个不同的场景文本分别输入预先训练的向量模型中,分别获得场景向量;
基于无监督K-means算法聚类所述场景向量,获得聚类结果。
在本实施例中,场景文本具体指该场景下的文本数据,例如,在外部机器人与客户对话的场景中,外部机器人与客户对话的内容即为该场景的场景文本。当然,在实际操作过程中,场景文本可以根据实际需要和模型的表现情况进行适应性的选择调整,比如,选取对该场景的描述文本作为场景文本。其中,向量模型为Doc2vec,Doc2vec是一种非监督式算法,可以获得句子/段落/文本的向量表达。通过向量模型将场景文本转化为场景向量,便于通过算法聚类场景向量,进而实现场景聚类。
所述将所述多个不同的场景文本分别输入预先训练的向量模型中,分别获得场景向量的步骤包括:
依次将每个所述场景文本分别输入预先训练的向量模型中的分类记忆网络和词袋网络中,分别获得第一文本特征向量和第二文本特征向量;
组装所述第一文本特征向量和第二文本特征向量,获得所述场景向量。
在本实施例中,Doc2vec输出的向量表达的主旨相对于其他向量模型更加准确。Doc2vec中包括两种网络,分别为:分类记忆网络(Distributed Memory,DM)和词袋网络(Distributed Bag of Words,DBOW)。通过组装所述第一文本特征向量和第二文本特征向量,获得场景向量。例如,分类记忆网络输出的第一文本特征向量为(p1,p2,p3,p4),词袋网络输出的第二文本特征向量为(q1,q2,q3,q4),则场景向量为(p1,p2,p3,p4,q1,q2,q3,q4)。
S2:根据所述聚类结果确定第一类场景和第二类场景,其中,所述第一类场景包括第一场景,所述第一场景中标注数据的数据量大于所述第二类场景中任意场景的标注数据的数据量。
在本实施例中,通过聚类将多个不同的场景划分为不同的类别。根据场景的类别,确定第一类场景和第二类场景。本申请中,第一类场景和第二类场景并不特指场景的某一类别,而是泛指任一类别,在实际应用过程中,可以根据实际需要确定选择的场景的类别,例如,选择对应的场景较多的分类作为第一类场景,或者选择存在预先标识的重要等级高的场景的分类作为第一类场景。其中,重要等级超过预设的等级阈值,则确定该重要等级高。根据场景的聚类结果,确定第一类场景和第二类场景后,便于后续对同一类场景的迁移学习。但需要注意的是,第一类场景中总是存在至少一个场景(本申请指第一场景)的标注数据的数据量要大于第二类场景中任意场景的标注数据的数据量,以保证最初通过第一场景所训练的识别模型不会在后续训练过程中发生较大的改变,且保证第一场景中具有足够的标注数据用于训练识别模型。换言之,由于第一场景中标注数据的数据量较多,适合作为第一个训练识别模型的场景,后续在将通过第一场景训练后的识别模型最初迁移到其他场景中时,只需要其他场景中的少量标注数据对该识别模型进行微调,即可获得较好的识别模型。
S3:基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型。
在本实施例中,同一类场景中,场景都属于相似场景,通过预先设定的识别模型对第一类场景进行迁移学习,实现模型先对相似的场景进行迁移学习,能够保证识别模型可以捕获相似场景下的细粒度的知识,输出较好的预标注数据。
具体的,所述第一类场景至少包括第一场景和第二场景,所述基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型的步骤包括:
基于所述第一场景中包含的标注数据训练预设的识别模型,获得第一识别模型,其中,所述第一场景包括对应的标注数据;
基于所述第二场景中包含的标注数据调整所述第一识别模型,获得第二识别模型,其中,所述第二场景包括对应的标注数据和未标注数据;
将所述第二场景中包含的未标注数据输入所述第二识别模型中,获得第二场景对应的预标注数据,并校正所述预标注数据,获得第一标注结果;
通过所述第一标注结果训练所述第二识别模型,获得第二场景对应的第三识别模型;
判断所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数是否相等;
若相等则将所述第三识别模型作为所述迁移模型,获得所述迁移模型和第一类场景中每个场景的预标注数据;
若不相等,则通过所述第三识别模型对下一个场景进行学习,直至所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数相等,获得所述迁移模型和第一类场景中每个场景的预标注数据。
在本实施例中,使用第一场景中的标注数据作为识别模型的输入,其中,该标注数据是指由相关人员挑选的高质量的已经标注的数据。本申请的识别模型为NLP(Natural Language Processing,自然语言处理)模型。通过第一场景中的高质量标注数据训练识别模型,在意图识别任务中,识别模型的损失函数可以采用交叉熵损失函数,交叉熵损失函数(Cross Entropy Loss)用于表征真实样本标签和预测概率之间的差值,当识别模型的准确度达到预设的准确率阈值时,确定完成训练,获得第一识别模型。此外,由于第一场景中的标注数据用于训练识别模型,第二场景中的标注数据用于调整识别模型,第一场景中的标注数据的数据量需要大于第二场景中的标注数据的数据量,以保证模型在第二场景中不会有过大的改变。通过判断识别模型已经学习的场景个数与所述第一类场景中包含的场景个数是否相等,来确定识别模型是否已经对第一类场景中的所有场景进行了迁移学习,并且是否完成了对各场景的预标注。其中,若第一场景中存在未标注数据,则识别模型在第一场景中训练完成之后,可以直接对第一场景中的未标注数据进行标注。后续对其他场景的预标注,则只需要依次通过各场景中的少量标注数据对识别模型进行调整,即可用于对应场景的预标注,且由于场景相似并且对模型进行了调整,输出的预标注数据质量较高,有效的实现了快速获得不同场景的大量优质的预标注数据。
进一步的,所述基于所述第二场景中包含的标注数据调整所述第一识别模型,获得第二识别模型的步骤包括:
根据预设的划分位置,将所述第一识别模型划分为固定层和待调整层;
基于所述第二场景中包含的标注数据训练所述待调整层,获得调整层;
组合所述固定层和所述调整层,获得所述第二识别模型。
在本实施例中,所述固定层为所述第一识别模型的前n层,所述待调整层为所述第一识别模型的后m层,n,m均为正整数。固定层和待调整层组成了第一识别模型。用第二场景中的标注数据训练所述待调整层,即表示固定第一模型的前几层参数,使用第二场景中的标注数据只训练第一识别模型的后几层参数。本申请通过微调实现获得学习到第二场景下的特征的第二识别模型。通过该方式,解决了第二场景中标注数据不足的问题,且无需大量的第二场景中的标注数据,即可训练出表现较好的第二识别模型,通过第二识别模型又能够实现对第二场景中未标注数据进行高质量的标注,有效提升了数据标注的效率。
需要说明的是:上述所述第一标注结果训练所述第二识别模型,获得第二场景对应的第三识别模型的训练过程,既可以是训练迭代所述第二识别模型的全部参数,也可以是调 整所述第二识别模型,即仅训练上述第二识别模型的待调整层。
此外,所述校正所述预标注数据,获得标注结果的步骤包括:
将所述第二场景对应的预标注数据展示在预设的前端页面中;
向相关人员发送矫正通知,以通知所述相关人员在所述前端页面中矫正所述预标注数据;
当接收所述相关人员返回的矫正完成通知后,获取所述相关人员矫正后的预标注数据,作为标注结果。
在本实施例中,通过将预标注数据展示在前端页面,通知相关人员针对预标注的数据进行校正,矫正之后产出的即为第二场景下的高质量的标注数据。由于上述预标注的质量较好,故相关人员矫正预标注数据的速度也得到了有效的提升,能够实现快速获得高质量的标注数据。
S4:基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据。
在本实施例中,识别模型在第一类场景中完成迁移学习后,获得迁移模型。基于迁移模型对第二类场景进行迁移学习
具体的,所述第二类场景至少包括第三场景,所述基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据的步骤包括:
基于所述第三场景中包含的标注数据调整所述迁移模型,获得第一迁移模型,其中,所述第三场景包括对应的标注数据和未标注数据;
通过所述第一迁移模型预标注所述第三场景中包含的未标注数据,获得第三场景对应的预标注数据,并校正所述预标注数据,获得第二标注结果;
通过所述第二标注结果训练所述第一迁移模型,获得第三场景对应的第二迁移模型;
判断所述迁移模型已经学习的场景个数与所述第二类场景中包含的场景个数是否相等;
若相等则确定完成对各场景的预标注,获得第二类场景中每个场景的预标注数据;
若不相等,则通过所述第二迁移模型对下一个场景进行学习,直至所述迁移模型已经学习的场景个数与所述第二类场景中包含的场景个数相等,获得第二类场景中每个场景的预标注数据。
在本实施例中,通过第三场景中的标注数据调整迁移模型。其中,所述基于所述第三场景中包含的标注数据调整所述迁移模型,获得第一迁移模型的步骤与上述基于所述第二场景中包含的标注数据调整所述第一识别模型,获得第二识别模型的步骤一致,此处不再赘述。需要说明的是:在第一识别模型中,所述固定层为所述第一识别模型的前n层,所述待调整层为所述第一识别模型的后m层。在迁移模型中,所述固定层为迁移模型的前k层,待调整层为迁移模型的后h层。其中,n=k且m=h,或n≠k且m≠h。通过将在相似场景中完成迁移学习的模型,输入另一类的场景中,并通过另一类场景中的标注数据对输入的迁移模型进行调整,使得迁移模型可以学习到该场景的特征,进而能够捕获该场景中粗粒度的知识,实现输出的预标注数据相对于未进行调整的模型输出的预标注数据的质量更佳,有效提高了标注的效率,减少了相同任务类型中不同场景下模型设计和开发的成本。
需要说明的是:上述通过所述第二标注结果训练所述第一迁移模型,获得第三场景对应的第二迁移模型的过程,既可以是训练迭代所述第一迁移模型的全部参数,也可以是调整所述第一迁移模型,即仅需要训练上述的第一迁移模型的待调整层即可。
此外,还需要说明的是,本申请可以应用于多种不同的预标注场景中。以意图识别任务为例,该任务类型下可以有礼品赠送对话场景、物品销售对话场景和售后对话场景等。在聚类过程中,礼品赠送对话场景与物品销售对话场景被分类为上述第一类场景,售后对话场景被分类为上述第二类场景。其中,礼品赠送对话场景中包含大量的高质量的意图标注数据,而物品销售对话场景和售后对话场景中只有少量的高质量的意图标注数据,则通 过上述本申请的方案,可以有效的获得物品销售对话场景和售后对话场景对应的大量的高质量的意图标注数据。
本申请在相同任务类型下,对多个不同的场景进行聚类,获得聚类结果,并根据聚类结果实现场景的划分,预设的识别模型先在同一类场景中进行迁移学习,由于场景相似,识别模型能够捕获相似场景下的细粒度的知识,进而识别模型在同一类下的不同场景中能够输出的较好的预标注数据。完成同一类的相似场景的迁移学习后,将获得的迁移模型输入另一类的场景中,依然能够捕获属于同任务类型下,不相似场景中的粗粒度的知识,从而能够解决在模型训练早期高质量的标注数据不足的情况,减少相同任务类型中不同场景下模型设计和开发的成本,提高预标注的效果,保证计算机能够高效的产出有效的标注数据。
需要强调的是,为进一步保证上述每个场景的预标注数据的私密和安全性,上述每个场景的预标注数据还可以存储于一区块链的节点中。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
进一步参考图3,作为对上述图2所示方法的实现,本申请提供了一种基于层次化迁移学习的预标注装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图3所示,本实施例所述的基于层次化迁移学习的预标注装置300包括:场景聚类模块301、类别确定模块302、第一标注模块303以及第二标注模块304。其中:场景聚类模块301,用于基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果;类别确定模块302,用于根据所述聚类结果确定第一类场景和第二类场景,其中,所述第一类场景包括第一场景,所述第一场景中标注数据的数据量大于所述第二类场景中任意场景的标注数据的数据量;第一标注模块303,用于基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型;第二标注模块304,用于基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据。
在本实施例中,本申请在相同任务类型下,对多个不同的场景进行聚类,获得聚类结果,并根据聚类结果实现场景的划分,预设的识别模型先在同一类场景中进行迁移学习,由于场景相似,识别模型能够捕获相似场景下的细粒度的知识,进而识别模型在同一类下的不同场景中能够输出的较好的预标注数据。完成同一类的相似场景的迁移学习后,将获得的迁移模型输入另一类的场景中,依然能够捕获属于同任务类型下,不相似场景中的粗粒度的知识,从而能够解决在模型训练早期高质量的标注数据不足的情况,减少相同任务 类型中不同场景下模型设计和开发的成本,提高预标注的效果,保证计算机能够高效的产出有效的标注数据。
所述场景聚类模块301包括接收子模块、输入子模块和聚类子模块。接收子模块用于接收多个不同的场景文本,其中,所述场景文本与所述场景一一对应;输入子模块用于将所述多个不同的场景文本分别输入预先训练的向量模型中,分别获得场景向量;聚类子模块用于基于无监督K-means算法聚类所述场景向量,获得聚类结果。
所述输入子模块包括输入单元和组装单元。输入单元用于依次将每个所述场景文本分别输入预先训练的向量模型中的分类记忆网络和词袋网络中,分别获得第一文本特征向量和第二文本特征向量;组装单元用于组装所述第一文本特征向量和第二文本特征向量,获得所述场景向量。
所述第一类场景至少包括第一场景和第二场景,第一标注模块303包括第一训练子模块、第一调整子模块、第一矫正子模块、第一获得子模块、第一判断子模块、第一相等子模块和第一终止子模块。第一训练子模块用于基于所述第一场景中包含的标注数据训练预设的识别模型,获得第一识别模型,其中,所述第一场景包括对应的标注数据;第一调整子模块用于基于所述第二场景中包含的标注数据调整所述第一识别模型,获得第二识别模型,其中,所述第二场景包括对应的标注数据和未标注数据;第一矫正子模块用于将所述第二场景中包含的未标注数据输入所述第二识别模型中,获得第二场景对应的预标注数据,并校正所述预标注数据,获得第一标注结果;第一获得子模块用于通过所述第一标注结果训练所述第二识别模型,获得第二场景对应的第三识别模型;第一判断子模块用于判断所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数是否相等;第一相等子模块用于当所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数相等时,将所述第三识别模型作为所述迁移模型,获得所述迁移模型和第一类场景中每个场景的预标注数据;第一终止子模块用于当所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数不相等时,通过所述第三识别模型对下一个场景进行学习,直至所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数相等,获得所述迁移模型和第一类场景中每个场景的预标注数据。
第一调整子模块包括划分单元、训练单元和组合单元。划分单元用于根据预设的划分位置,将所述第一识别模型划分为固定层和待调整层;训练单元用于基于所述第二场景中包含的标注数据训练所述待调整层,获得调整层;组合单元用于组合所述固定层和所述调整层,获得所述第二识别模型。
第一矫正子模块包括展示单元、通知单元和标注单元。展示单元用于将所述第二场景对应的预标注数据展示在预设的前端页面中;通知单元用于向相关人员发送矫正通知,以通知所述相关人员在所述前端页面中矫正所述预标注数据;标注单元用于当接收所述相关人员返回的矫正完成通知后,获取所述相关人员矫正后的预标注数据,作为标注结果。
所述第二类场景至少包括第三场景,第二标注模块304包括第二调整子模块、第二矫正子模块、第二获得子模块、第二判断子模块、第二相等子模块和第二终止子模块。第二调整子模块用于基于所述第三场景中包含的标注数据调整所述迁移模型,获得第一迁移模型,其中,所述第三场景包括对应的标注数据和未标注数据;第二矫正子模块用于通过所述第一迁移模型预标注所述第三场景中包含的未标注数据,获得第三场景对应的预标注数据,并校正所述预标注数据,获得第二标注结果;第二获得子模块用于通过所述第二标注结果训练所述第一迁移模型,获得第三场景对应的第二迁移模型;第二判断子模块用于判断所述迁移模型已经学习的场景个数与所述第二类场景中包含的场景个数是否相等;第二相等子模块用于当迁移模型已经学习的场景个数与所述第二类场景中包含的场景个数否相等时,确定完成对各场景的预标注,获得第二类场景中每个场景的预标注数据;第二终止子模块用于当迁移模型已经学习的场景个数与所述第二类场景中包含的场景个数不相等时,通过所述第二迁移模型对下一个场景进行学习,直至所述迁移模型已经学习的场景 个数与所述第二类场景中包含的场景个数相等,获得第二类场景中每个场景的预标注数据。
本申请在相同任务类型下,对多个不同的场景进行聚类,获得聚类结果,并根据聚类结果实现场景的划分,预设的识别模型先在同一类场景中进行迁移学习,由于场景相似,识别模型能够捕获相似场景下的细粒度的知识,进而识别模型在同一类下的不同场景中能够输出的较好的预标注数据。完成同一类的相似场景的迁移学习后,将获得的迁移模型输入另一类的场景中,依然能够捕获属于同任务类型下,不相似场景中的粗粒度的知识,从而能够解决在模型训练早期高质量的标注数据不足的情况,减少相同任务类型中不同场景下模型设计和开发的成本,提高预标注的效果,保证计算机能够高效的产出有效的标注数据。
为解决上述技术问题,本申请实施例还提供计算机设备。具体请参阅图4,图4为本实施例计算机设备基本结构框图。
所述计算机设备200包括通过系统总线相互通信连接存储器201、处理器202、网络接口203。需要指出的是,图中仅示出了具有组件201-203的计算机设备200,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
所述存储器201至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器201可以是所述计算机设备200的内部存储单元,例如该计算机设备200的硬盘或内存。在另一些实施例中,所述存储器201也可以是所述计算机设备200的外部存储设备,例如该计算机设备200上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器201还可以既包括所述计算机设备200的内部存储单元也包括其外部存储设备。本实施例中,所述存储器201通常用于存储安装于所述计算机设备200的操作系统和各类应用软件,例如基于层次化迁移学习的预标注方法的计算机可读指令等。此外,所述存储器201还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器202在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器202通常用于控制所述计算机设备200的总体操作。本实施例中,所述处理器202用于运行所述存储器201中存储的计算机可读指令或者处理数据,例如运行所述基于层次化迁移学习的预标注方法的计算机可读指令。
所述网络接口203可包括无线网络接口或有线网络接口,该网络接口203通常用于在所述计算机设备200与其他电子设备之间建立通信连接。
在本实施例中,解决在模型训练早期高质量的标注数据不足的情况,提高预标注的效果,保证计算机能够高效的产出有效的标注数据。
本申请还提供了另一种实施方式,即提供一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性。所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令可被至少一个处理器执行,以使所述至少一个处理器执行如上述的基于层次化迁移学习的预标注方法的步骤。
在本实施例中,解决在模型训练早期高质量的标注数据不足的情况,提高预标注的效果,保证计算机能够高效的产出有效的标注数据。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
显然,以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。

Claims (20)

  1. 一种基于层次化迁移学习的预标注方法,包括下述步骤:
    基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果,其中,所述多个不同的场景属于同一任务;
    根据所述聚类结果确定第一类场景和第二类场景,其中,所述第一类场景包括第一场景,所述第一场景中标注数据的数据量大于所述第二类场景中任意场景的标注数据的数据量;
    基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型;
    基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据。
  2. 根据权利要求1所述的基于层次化迁移学习的预标注方法,其中,所述基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果的步骤包括:
    接收多个不同的场景文本,其中,所述场景文本与所述场景一一对应;
    将所述多个不同的场景文本分别输入预先训练的向量模型中,分别获得场景向量;
    基于无监督K-means算法聚类所述场景向量,获得聚类结果。
  3. 根据权利要求2所述的基于层次化迁移学习的预标注方法,其中,所述将所述多个不同的场景文本分别输入预先训练的向量模型中,分别获得场景向量的步骤包括:
    依次将每个所述场景文本分别输入预先训练的向量模型中的分类记忆网络和词袋网络中,分别获得第一文本特征向量和第二文本特征向量;
    组装所述第一文本特征向量和第二文本特征向量,获得所述场景向量。
  4. 根据权利要求1所述的基于层次化迁移学习的预标注方法,其中,所述第一类场景至少包括第一场景和第二场景,所述基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型的步骤包括:
    基于所述第一场景中包含的标注数据训练预设的识别模型,获得第一识别模型,其中,所述第一场景包括对应的标注数据;
    基于所述第二场景中包含的标注数据调整所述第一识别模型,获得第二识别模型,其中,所述第二场景包括对应的标注数据和未标注数据;
    将所述第二场景中包含的未标注数据输入所述第二识别模型中,获得第二场景对应的预标注数据,并校正所述预标注数据,获得第一标注结果;
    通过所述第一标注结果训练所述第二识别模型,获得第二场景对应的第三识别模型;
    判断所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数是否相等;
    若相等,则将所述第三识别模型作为所述迁移模型,获得所述迁移模型和第一类场景中每个场景的预标注数据;
    若不相等,则通过所述第三识别模型对下一个场景进行学习,直至所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数相等,获得所述迁移模型和第一类场景中每个场景的预标注数据。
  5. 根据权利要求4所述的基于层次化迁移学习的预标注方法,其中,所述基于所述第二场景中包含的标注数据调整所述第一识别模型,获得第二识别模型的步骤包括:
    根据预设的划分位置,将所述第一识别模型划分为固定层和待调整层;
    基于所述第二场景中包含的标注数据训练所述待调整层,获得调整层;
    组合所述固定层和所述调整层,获得所述第二识别模型。
  6. 根据权利要求4所述的基于层次化迁移学习的预标注方法,其中,所述校正所述预标注数据,获得标注结果的步骤包括:
    将所述第二场景对应的预标注数据展示在预设的前端页面中;
    向相关人员发送矫正通知,以通知所述相关人员在所述前端页面中矫正所述预标注数 据;
    当接收所述相关人员返回的矫正完成通知后,获取所述相关人员矫正后的预标注数据,作为标注结果。
  7. 根据权利要求1所述的基于层次化迁移学习的预标注方法,其中,所述第二类场景至少包括第三场景,所述基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据的步骤包括:
    基于所述第三场景中包含的标注数据调整所述迁移模型,获得第一迁移模型,其中,所述第三场景包括对应的标注数据和未标注数据;
    通过所述第一迁移模型预标注所述第三场景中包含的未标注数据,获得第三场景对应的预标注数据,并校正所述预标注数据,获得第二标注结果;
    通过所述第二标注结果训练所述第一迁移模型,获得第三场景对应的第二迁移模型;
    判断所述迁移模型已经学习的场景个数与所述第二类场景中包含的场景个数是否相等;
    若相等,则确定完成对各场景的预标注,获得第二类场景中每个场景的预标注数据;
    若不相等,则通过所述第二迁移模型对下一个场景进行学习,直至所述迁移模型已经学习的场景个数与所述第二类场景中包含的场景个数相等,获得第二类场景中每个场景的预标注数据。
  8. 一种基于层次化迁移学习的预标注装置,包括:
    场景聚类模块,用于基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果;
    类别确定模块,用于根据所述聚类结果确定第一类场景和第二类场景,其中,所述第一类场景包括第一场景,所述第一场景中标注数据的数据量大于所述第二类场景中任意场景的标注数据的数据量;
    第一标注模块,用于基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型;
    第二标注模块,用于基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据。
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现如下所述的基于层次化迁移学习的预标注方法的步骤:
    基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果,其中,所述多个不同的场景属于同一任务;
    根据所述聚类结果确定第一类场景和第二类场景,其中,所述第一类场景包括第一场景,所述第一场景中标注数据的数据量大于所述第二类场景中任意场景的标注数据的数据量;
    基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型;
    基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据。
  10. 根据权利要求9所述的计算机设备,其中,所述基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果的步骤包括:
    接收多个不同的场景文本,其中,所述场景文本与所述场景一一对应;
    将所述多个不同的场景文本分别输入预先训练的向量模型中,分别获得场景向量;
    基于无监督K-means算法聚类所述场景向量,获得聚类结果。
  11. 根据权利要求10所述的计算机设备,其中,所述将所述多个不同的场景文本分别输入预先训练的向量模型中,分别获得场景向量的步骤包括:
    依次将每个所述场景文本分别输入预先训练的向量模型中的分类记忆网络和词袋网络中,分别获得第一文本特征向量和第二文本特征向量;
    组装所述第一文本特征向量和第二文本特征向量,获得所述场景向量。
  12. 根据权利要求9所述的计算机设备,其中,所述第一类场景至少包括第一场景和第二场景,所述基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型的步骤包括:
    基于所述第一场景中包含的标注数据训练预设的识别模型,获得第一识别模型,其中,所述第一场景包括对应的标注数据;
    基于所述第二场景中包含的标注数据调整所述第一识别模型,获得第二识别模型,其中,所述第二场景包括对应的标注数据和未标注数据;
    将所述第二场景中包含的未标注数据输入所述第二识别模型中,获得第二场景对应的预标注数据,并校正所述预标注数据,获得第一标注结果;
    通过所述第一标注结果训练所述第二识别模型,获得第二场景对应的第三识别模型;
    判断所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数是否相等;
    若相等,则将所述第三识别模型作为所述迁移模型,获得所述迁移模型和第一类场景中每个场景的预标注数据;
    若不相等,则通过所述第三识别模型对下一个场景进行学习,直至所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数相等,获得所述迁移模型和第一类场景中每个场景的预标注数据。
  13. 根据权利要求12所述的计算机设备,其中,所述基于所述第二场景中包含的标注数据调整所述第一识别模型,获得第二识别模型的步骤包括:
    根据预设的划分位置,将所述第一识别模型划分为固定层和待调整层;
    基于所述第二场景中包含的标注数据训练所述待调整层,获得调整层;
    组合所述固定层和所述调整层,获得所述第二识别模型。
  14. 根据权利要求12所述的计算机设备,其中,所述校正所述预标注数据,获得标注结果的步骤包括:
    将所述第二场景对应的预标注数据展示在预设的前端页面中;
    向相关人员发送矫正通知,以通知所述相关人员在所述前端页面中矫正所述预标注数据;
    当接收所述相关人员返回的矫正完成通知后,获取所述相关人员矫正后的预标注数据,作为标注结果。
  15. 根据权利要求9所述的计算机设备,其中,所述第二类场景至少包括第三场景,所述基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据的步骤包括:
    基于所述第三场景中包含的标注数据调整所述迁移模型,获得第一迁移模型,其中,所述第三场景包括对应的标注数据和未标注数据;
    通过所述第一迁移模型预标注所述第三场景中包含的未标注数据,获得第三场景对应的预标注数据,并校正所述预标注数据,获得第二标注结果;
    通过所述第二标注结果训练所述第一迁移模型,获得第三场景对应的第二迁移模型;
    判断所述迁移模型已经学习的场景个数与所述第二类场景中包含的场景个数是否相等;
    若相等,则确定完成对各场景的预标注,获得第二类场景中每个场景的预标注数据;
    若不相等,则通过所述第二迁移模型对下一个场景进行学习,直至所述迁移模型已经学习的场景个数与所述第二类场景中包含的场景个数相等,获得第二类场景中每个场景的预标注数据。
  16. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如下所述的基于层次化迁移学习的预标注方法的步骤:
    基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果,其中,所述多个不同的场景属于同一任务;
    根据所述聚类结果确定第一类场景和第二类场景,其中,所述第一类场景包括第一场景,所述第一场景中标注数据的数据量大于所述第二类场景中任意场景的标注数据的数据量;
    基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型;
    基于所述迁移模型对所述第二类场景进行迁移学习,获得第二类场景中每个场景的预标注数据。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述基于预设的聚类算法对预先接收的多个不同的场景进行聚类,获得聚类结果的步骤包括:
    接收多个不同的场景文本,其中,所述场景文本与所述场景一一对应;
    将所述多个不同的场景文本分别输入预先训练的向量模型中,分别获得场景向量;
    基于无监督K-means算法聚类所述场景向量,获得聚类结果。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述将所述多个不同的场景文本分别输入预先训练的向量模型中,分别获得场景向量的步骤包括:
    依次将每个所述场景文本分别输入预先训练的向量模型中的分类记忆网络和词袋网络中,分别获得第一文本特征向量和第二文本特征向量;
    组装所述第一文本特征向量和第二文本特征向量,获得所述场景向量。
  19. 根据权利要求16所述的计算机可读存储介质,其中,所述第一类场景至少包括第一场景和第二场景,所述基于预设的识别模型对所述第一类场景进行迁移学习,获得第一类场景中每个场景的预标注数据和迁移模型的步骤包括:
    基于所述第一场景中包含的标注数据训练预设的识别模型,获得第一识别模型,其中,所述第一场景包括对应的标注数据;
    基于所述第二场景中包含的标注数据调整所述第一识别模型,获得第二识别模型,其中,所述第二场景包括对应的标注数据和未标注数据;
    将所述第二场景中包含的未标注数据输入所述第二识别模型中,获得第二场景对应的预标注数据,并校正所述预标注数据,获得第一标注结果;
    通过所述第一标注结果训练所述第二识别模型,获得第二场景对应的第三识别模型;
    判断所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数是否相等;
    若相等,则将所述第三识别模型作为所述迁移模型,获得所述迁移模型和第一类场景中每个场景的预标注数据;
    若不相等,则通过所述第三识别模型对下一个场景进行学习,直至所述识别模型已经学习的场景个数与所述第一类场景中包含的场景个数相等,获得所述迁移模型和第一类场景中每个场景的预标注数据。
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述基于所述第二场景中包含的标注数据调整所述第一识别模型,获得第二识别模型的步骤包括:
    根据预设的划分位置,将所述第一识别模型划分为固定层和待调整层;
    基于所述第二场景中包含的标注数据训练所述待调整层,获得调整层;
    组合所述固定层和所述调整层,获得所述第二识别模型。
PCT/CN2021/082942 2020-11-27 2021-03-25 基于层次化迁移学习的预标注方法及其相关设备 WO2022001233A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011364408.9 2020-11-27
CN202011364408.9A CN112434746B (zh) 2020-11-27 2020-11-27 基于层次化迁移学习的预标注方法及其相关设备

Publications (1)

Publication Number Publication Date
WO2022001233A1 true WO2022001233A1 (zh) 2022-01-06

Family

ID=74697880

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/082942 WO2022001233A1 (zh) 2020-11-27 2021-03-25 基于层次化迁移学习的预标注方法及其相关设备

Country Status (2)

Country Link
CN (1) CN112434746B (zh)
WO (1) WO2022001233A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116340335A (zh) * 2023-05-30 2023-06-27 广东石油化工学院 基于联盟链的工业设备数据存储系统及其数据处理方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434746B (zh) * 2020-11-27 2023-10-27 平安科技(深圳)有限公司 基于层次化迁移学习的预标注方法及其相关设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009038A (zh) * 2019-04-04 2019-07-12 北京百度网讯科技有限公司 筛查模型的训练方法、装置及存储介质
CN110728294A (zh) * 2019-08-30 2020-01-24 北京影谱科技股份有限公司 一种基于迁移学习的跨领域图像分类模型构建方法和装置
CN111259812A (zh) * 2020-01-17 2020-06-09 上海交通大学 基于迁移学习的内河船舶重识别方法、设备及存储介质
CN111860674A (zh) * 2020-07-28 2020-10-30 平安科技(深圳)有限公司 样本类别识别方法、装置、计算机设备及存储介质
CN112434746A (zh) * 2020-11-27 2021-03-02 平安科技(深圳)有限公司 基于层次化迁移学习的预标注方法及其相关设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180314975A1 (en) * 2017-04-27 2018-11-01 Futurewei Technologies, Inc. Ensemble transfer learning
CN109657552B (zh) * 2018-11-16 2022-11-29 北京邮电大学 基于迁移学习实现跨场景冷启动的车型识别装置与方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009038A (zh) * 2019-04-04 2019-07-12 北京百度网讯科技有限公司 筛查模型的训练方法、装置及存储介质
CN110728294A (zh) * 2019-08-30 2020-01-24 北京影谱科技股份有限公司 一种基于迁移学习的跨领域图像分类模型构建方法和装置
CN111259812A (zh) * 2020-01-17 2020-06-09 上海交通大学 基于迁移学习的内河船舶重识别方法、设备及存储介质
CN111860674A (zh) * 2020-07-28 2020-10-30 平安科技(深圳)有限公司 样本类别识别方法、装置、计算机设备及存储介质
CN112434746A (zh) * 2020-11-27 2021-03-02 平安科技(深圳)有限公司 基于层次化迁移学习的预标注方法及其相关设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116340335A (zh) * 2023-05-30 2023-06-27 广东石油化工学院 基于联盟链的工业设备数据存储系统及其数据处理方法
CN116340335B (zh) * 2023-05-30 2023-09-05 广东石油化工学院 基于联盟链的工业设备数据存储系统及其数据处理方法

Also Published As

Publication number Publication date
CN112434746B (zh) 2023-10-27
CN112434746A (zh) 2021-03-02

Similar Documents

Publication Publication Date Title
WO2022142014A1 (zh) 基于多模态信息融合的文本分类方法、及其相关设备
WO2021155713A1 (zh) 基于权重嫁接的模型融合的人脸识别方法及相关设备
CN109918662B (zh) 一种电子资源的标签确定方法、装置和可读介质
WO2021120677A1 (zh) 一种仓储模型训练方法、装置、计算机设备及存储介质
JP6402408B2 (ja) タグ処理方法及びタグ処理装置
WO2021174877A1 (zh) 基于智能决策的目标检测模型的处理方法、及其相关设备
WO2021143267A1 (zh) 基于图像检测的细粒度分类模型处理方法、及其相关设备
WO2022001233A1 (zh) 基于层次化迁移学习的预标注方法及其相关设备
WO2023035531A1 (zh) 文本图像超分辨率重建方法及其相关设备
CN112395390B (zh) 意图识别模型的训练语料生成方法及其相关设备
CN113220734A (zh) 课程推荐方法、装置、计算机设备及存储介质
CN112528029A (zh) 文本分类模型处理方法、装置、计算机设备及存储介质
WO2023213157A1 (zh) 数据处理方法、装置、程序产品、计算机设备和介质
CN115510186A (zh) 基于意图识别的即时问答方法、装置、设备及存储介质
CN113111198B (zh) 基于协同过滤算法的演示文稿推荐方法及相关设备
WO2022156087A1 (zh) 数据血缘关系建立方法、装置、计算机设备及存储介质
CN111143568A (zh) 一种论文分类时的缓冲方法、装置、设备及存储介质
CN117459575A (zh) 业务数据推送方法、装置、计算机设备和存储介质
CN116030375A (zh) 视频特征提取、模型训练方法、装置、设备及存储介质
WO2022105120A1 (zh) 图片文字检测方法、装置、计算机设备及存储介质
CN115756692A (zh) 基于样式属性自动组合展示页面的方法及其相关设备
JP2023554210A (ja) インテリジェント推奨用のソートモデルトレーニング方法及び装置、インテリジェント推奨方法及び装置、電子機器、記憶媒体、並びにコンピュータプログラム
CN115168609A (zh) 一种文本匹配方法、装置、计算机设备和存储介质
CN113240071A (zh) 图神经网络处理方法、装置、计算机设备及存储介质
CN112966150A (zh) 一种视频内容抽取的方法、装置、计算机设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21832119

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21832119

Country of ref document: EP

Kind code of ref document: A1