Training method of content understanding model, content understanding method and related device
By generating sample data and iteratively training the content understanding model, the problem of time-consuming and labor-intensive manual data annotation was solved, achieving an optimized closed loop of efficient and automated data generation and content understanding, and improving the model's understanding ability.
Patent Information
- Application Number
- CN202310107980.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-19
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-01-19
AI Technical Summary
In existing technologies, manual data annotation is time-consuming and labor-intensive, resulting in low data production efficiency and limited data types, making it difficult to improve the capabilities of content understanding models.
Sample data is generated using sample reference information. The content understanding model is trained iteratively, and the output of the content understanding model is used to guide the data generation process in reverse, forming an optimization loop and achieving dual optimization of automated data generation and content understanding.
It improved data generation efficiency and quality, optimized the iterative process of the content understanding model, and achieved better content understanding capabilities.
Smart Images

Figure CN116205309B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, particularly to the fields of deep learning, knowledge graphs, knowledge acquisition and knowledge mining, and specifically to a training method for a content understanding model, a content understanding method, and related apparatus. Background Technology
[0002] With the rapid development and advancement of artificial intelligence (AI) technology, people's lives have benefited greatly from AI, and more and more industries (such as healthcare, power, and logistics) are beginning to apply AI technology. Among these, data, as the most critical element in AI technology, is crucial for content understanding, so that AI technology can better serve people's lives and various industries. Summary of the Invention
[0003] This disclosure provides a method for training a content understanding model, a content understanding method, and related apparatus.
[0004] According to one aspect of this disclosure, a method for training a content understanding model is provided, the method comprising:
[0005] The initial model is iteratively trained to obtain a content understanding model, which is used to perform content recognition on data resources to obtain the content understanding results of the data resources.
[0006] Each iteration of training includes the following process:
[0007] Sample data is generated based on sample reference information; wherein, in response to any iteration training being the first iteration training, the sample reference information includes preset data resources, and in response to any iteration training being subsequent iteration training, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration training.
[0008] Input the sample data into the content understanding model obtained after the previous iteration of training to complete the current training of the model.
[0009] According to another aspect of this disclosure, a content understanding method is provided, the method comprising:
[0010] Acquire the data resources to be used for content recognition;
[0011] The data resource is input into the content understanding model, and the content understanding model performs content recognition on the data resource to obtain the content understanding result of the data resource.
[0012] The content understanding model is obtained by iteratively training an initial model using sample data. The sample data is generated based on sample reference information. In response to the first iteration of training, the sample reference information includes preset data resources. In response to subsequent iterations of training, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration.
[0013] According to another aspect of this disclosure, a training apparatus for a content understanding model is provided, the apparatus comprising:
[0014] The training module is used to iteratively train the initial model to obtain a content understanding model, which is used to perform content recognition on data resources to obtain the content understanding results of the data resources.
[0015] In any iteration of training, this training module includes:
[0016] A generation submodule is used to generate sample data based on sample reference information; wherein, in response to any iteration training being the first iteration training, the sample reference information includes preset data resources, and in response to any iteration training being the first iteration training or subsequent iteration training, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration training.
[0017] The input submodule is used to input the sample data into the content understanding model obtained after the previous iteration of training in order to complete the current training of the model.
[0018] According to another aspect of this disclosure, a content understanding apparatus is provided, the apparatus comprising:
[0019] The acquisition module is used to acquire data resources for content recognition.
[0020] The recognition module is used to input the data resource into the content understanding model, and the content understanding model performs content recognition on the data resource to obtain the content understanding result of the data resource.
[0021] The content understanding model is obtained by iteratively training an initial model using sample data. The sample data is generated based on sample reference information. In response to the first iteration of training, the sample reference information includes preset data resources. In response to subsequent iterations of training, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration.
[0022] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0023] At least one processor; and
[0024] The memory is communicatively connected to the at least one processor; wherein,
[0025] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the training method or content understanding method of the content understanding model provided in this disclosure.
[0026] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to execute a training method or a content understanding method for the content understanding model provided in this disclosure.
[0027] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the training method or content understanding method of the content understanding model provided in this disclosure.
[0028] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0029] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0030] Figure 1 This is a schematic diagram of the implementation environment of a training method for a content understanding model as shown in an embodiment of this disclosure;
[0031] Figure 2 This is a flowchart illustrating a training method for a content understanding model according to an embodiment of this disclosure;
[0032] Figure 3 This is a flowchart illustrating a content understanding method according to an embodiment of this disclosure;
[0033] Figure 4 This is a flowchart illustrating a training method for a content understanding model according to an embodiment of this disclosure;
[0034] Figure 5 This is a schematic diagram illustrating a basic sample data according to an embodiment of this disclosure;
[0035] Figure 6 This is a schematic diagram illustrating a data model according to an embodiment of this disclosure;
[0036] Figure 7 This is a schematic diagram illustrating the structure of a basic content understanding model according to an embodiment of this disclosure;
[0037] Figure 8This is a schematic diagram illustrating an iterative optimization of a model according to an embodiment of this disclosure;
[0038] Figure 9 This is a schematic diagram illustrating a closed loop of data generation and content understanding in an embodiment of this disclosure;
[0039] Figure 10 This is a structural block diagram of a training device for a content understanding model, as shown in an embodiment of this disclosure;
[0040] Figure 11 This is a structural block diagram of a content understanding device shown in an embodiment of this disclosure;
[0041] Figure 12 This is a block diagram of an electronic device used to implement the training method or content understanding method of the content understanding model in the embodiments of this disclosure. Detailed Implementation
[0042] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0043] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0044] First, the application scenarios involved in the embodiments of this disclosure are described. The training method of the content understanding model provided in the embodiments of this disclosure can be applied to data production scenarios or model training scenarios.
[0045] In related technologies, data is typically generated through manual annotation, and content understanding models are then built based on this manually annotated data to achieve the goal of data knowledge extraction. However, manual data annotation is time-consuming and labor-intensive, resulting in high data annotation costs and low data production efficiency. Furthermore, the types of data obtained from manually annotated data are limited, making it difficult to improve the capabilities of content understanding models when building them.
[0046] Based on this, embodiments of this disclosure provide a training method for a content understanding model. This method utilizes sample reference information to generate sample data, enabling automated sample data generation and significantly improving data generation efficiency. The sample data drives iterative optimization of the content understanding model. Simultaneously, the content understanding results output by the model are used to guide the data generation process, improving the quality of the sample data. Furthermore, higher-quality sample data can serve as new input to the content understanding model, further optimizing its iterative process. This results in a model with superior content understanding capabilities, enabling better data comprehension. Thus, the data generation and content understanding processes form an optimization loop, achieving dual optimization of both data generation and content understanding.
[0047] Figure 1 This is a schematic diagram illustrating the implementation environment of a training method for a content understanding model according to an embodiment of this disclosure. See also... Figure 1 The implementation environment includes terminal 101 and server 102.
[0048] The terminal 101 is at least one of the following devices: smartphone, smartwatch, desktop computer, laptop, virtual reality terminal, augmented reality terminal, wireless terminal, and laptop computer. In some embodiments, the terminal 101 has communication functions and can access a wired or wireless network. The terminal 101 can refer to one of multiple terminals; this embodiment uses terminal 101 as an example only. Those skilled in the art will understand that the number of terminals can be more or less.
[0049] In some embodiments, server 102 is an independent physical server, a server cluster consisting of multiple physical servers, a distributed file system, or at least one of the following cloud servers providing basic cloud computing services: cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data or artificial intelligence platforms. This disclosure does not limit the specific implementation of these embodiments. In some embodiments, the number of servers 102 may be more or fewer, and this disclosure does not limit the specific implementation of these embodiments. Of course, server 102 may also include other functions to provide more comprehensive and diversified services.
[0050] In some embodiments, the training method for the content understanding model provided in this disclosure can be executed by terminal 101. In other embodiments, the training method for the content understanding model provided in this disclosure can be executed by server 102. The following description uses an electronic device as the execution subject.
[0051] The following is based on Figure 1The implementation environment shown will be used to describe the methods provided in the embodiments of this disclosure.
[0052] Figure 2 This is a schematic flowchart illustrating a training method for a content understanding model according to an embodiment of this disclosure. In some embodiments, the training method for the content understanding model is performed by an electronic device. For example, the electronic device can be the one described above. Figure 1 The terminal or server shown. For example... Figure 2 As shown, the method includes the following steps.
[0053] S201. Iteratively train the initial model to obtain a content understanding model, which is used to perform content recognition on data resources to obtain the content understanding results of the data resources.
[0054] In this embodiment of the disclosure, the initial model refers to the base model to be trained. The content understanding model is obtained by iteratively training the initial model using sample data.
[0055] S202. During any iteration of training, sample data is generated based on the sample reference information; wherein, in response to the first iteration of training, the sample reference information includes preset data resources, and in response to subsequent iterations of training, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration of training.
[0056] In this embodiment, during the first iteration of training, the sample reference information includes preset data resources. That is, during the first iteration, sample data generated from the preset data resources is used for the first iteration of model training. In subsequent iterations, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration. That is, in subsequent iterations, sample data generated from the preset data resources and the content understanding results output from the previous iteration is used for the next iteration of model training. Thus, for the sample data used in subsequent iterations of model training, in addition to referencing the preset data resources, the content understanding results output from the previous iteration are also referenced, increasing the amount of information referenced in generating the sample data, improving the quality of the generated sample data, and consequently improving the model training effect.
[0057] S203. Input the sample data into the content understanding model obtained after the previous iteration of training to complete the current training of the model.
[0058] The technical solution provided in this disclosure utilizes sample reference information to generate sample data, enabling automated sample data generation and significantly improving data generation efficiency. This sample data drives the iterative optimization of the content understanding model. Simultaneously, the content understanding results output by the model guide the data generation process, improving the quality of the sample data. Furthermore, higher-quality sample data can serve as new input to the content understanding model, further optimizing its iterative process and resulting in a model with superior content understanding capabilities for better data comprehension. Thus, the data generation and content understanding processes form an optimization loop, achieving dual optimization of both data generation and content understanding.
[0059] Figure 3 This is a schematic flowchart illustrating a content understanding method according to an embodiment of this disclosure. In some embodiments, the content understanding method is performed by an electronic device. For example, the electronic device may be the one described above. Figure 1 The terminal or server shown. For example... Figure 3 As shown, the method includes the following steps.
[0060] S301. Obtain the data resources to be used for content recognition.
[0061] S302. Input the data resource into the content understanding model, and use the content understanding model to perform content recognition on the data resource to obtain the content understanding result of the data resource.
[0062] The content understanding model is obtained by iteratively training an initial model using sample data. The sample data is generated based on sample reference information. In response to the first iteration of training, the sample reference information includes preset data resources. In response to subsequent iterations of training, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration.
[0063] The technical solution provided in this disclosure utilizes sample reference information to generate sample data, enabling automated sample data generation and significantly improving data generation efficiency. This sample data drives the iterative optimization of the content understanding model. Simultaneously, the content understanding results output by the model guide the data generation process, improving the quality of the sample data. Furthermore, higher-quality sample data can serve as new input to the content understanding model, further optimizing its iterative process and resulting in a model with superior content understanding capabilities for better data comprehension. Thus, the data generation and content understanding processes form an optimization loop, achieving dual optimization of both data generation and content understanding.
[0064] The above Figures 2 to 3As a simple embodiment shown in this disclosure, the training method of the content understanding model provided in this disclosure will be described below based on a specific embodiment. Figure 4 This is a schematic flowchart illustrating a training method for a content understanding model according to an embodiment of this disclosure. In some embodiments, the training method for the content understanding model is performed by an electronic device. For example, the electronic device can be the one described above. Figure 1 The terminal or server shown. For example... Figure 4 As shown, with an electronic device as the executing entity, the method includes the following steps.
[0065] S401. The electronic device iteratively trains the initial model to obtain a content understanding model, which is used to perform content recognition on data resources to obtain the content understanding results of the data resources.
[0066] In this embodiment of the disclosure, the initial model refers to the base model to be trained. In some embodiments, the initial model may be a pre-trained model.
[0067] The data resource in S401 above refers to the data to be identified. In some embodiments, the data resource may be in the form of text, images, or videos. This disclosure does not limit the form of the data resource. The content understanding result refers to the content information obtained through content identification by the content understanding model. For example, the content understanding result may be a result used to characterize the semantics of the data resource.
[0068] S402. During any iteration of training, the electronic device generates sample data based on sample reference information; wherein, in response to the first iteration of training, the sample reference information includes preset data resources, and in response to subsequent iterations of training, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration of training.
[0069] The sample reference information refers to the relevant information referenced when generating sample data. In this embodiment, during the first iteration of training, the sample reference information includes preset data resources. That is, during the first iteration of training, sample data generated from the preset data resources is used for the first iteration of model training. In subsequent iterations, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration. That is, in subsequent iterations, sample data generated from the preset data resources and the content understanding results output from the previous iteration is used for the next iteration of model training. Thus, for the sample data used in subsequent iterations of model training, in addition to referencing the preset data resources, the content understanding results output from the previous iteration are also referenced, increasing the amount of information referenced in generating the sample data, improving the quality of the generated sample data, and consequently improving the model training effect.
[0070] In some embodiments, the preset data resources may include general data resources and industry data resources. General data resources refer to data resources applicable to all fields, while industry data resources refer to data resources specific to a particular field. It should be understood that general data resources have greater breadth, while industry data resources have greater depth. Therefore, combining general and industry data resources can create a more comprehensive preset data resource, broadening its scope. Subsequently, using this preset data resource to generate sample data can improve the efficiency of data production.
[0071] In some embodiments, the aforementioned data resources may be knowledge graphs, knowledge corpora, or knowledge documents, etc. A knowledge graph is used to describe the overall knowledge architecture of a data object using a visual graph; specifically, it may be a series of different graphs displaying the knowledge development process and knowledge structure relationships of the data object. A knowledge corpus is used to represent the data object using linguistic materials; specifically, it may be text, words, or sentences, etc. A knowledge document refers to a document related to the data object; specifically, it may be a file, article, or webpage, etc. For example, the preset data resources may include general knowledge graphs, industry knowledge graphs, general knowledge corpora, industry knowledge corpora, general knowledge documents, and industry knowledge documents.
[0072] In some embodiments, the sample data includes at least one of basic sample data, noisy data, and difficult sample data. The relevant contents of basic sample data, noisy data, and difficult sample data are described below based on (1) to (3).
[0073] (1) In some embodiments, the basic sample data is obtained by performing sample construction processing on the sample reference information.
[0074] In this embodiment of the disclosure, the sample construction process is used to automatically construct basic sample data using the sample reference information. In some embodiments, the basic sample data includes, but is not limited to, sample entity data, sample facet data, sample label data, sample triples, and sample key-value pairs.
[0075] For example, Figure 5 This is a schematic diagram illustrating basic sample data according to an embodiment of this disclosure. See also... Figure 5 The entity sample set is used to refer to the sample entity data, the triple sample set is used to refer to the sample triples, the key-value pair sample set is used to refer to the sample key-value pairs, the label sample set is used to refer to the sample label data, and the faceted sample set is used to refer to the sample faceted data. It should be understood that... Figure 5 This is merely an example to illustrate the basic sample data. (Except for...) Figure 5 In addition to the entity sample set, triplet sample set, key-value pair sample set, label sample set, and faceted sample set shown, other types of sample sets can also be used as the basic sample data. This disclosure does not limit the basic sample data. The following... Figure 5 Based on this, and in conjunction with (1-1) to (1-5) below, the relevant contents of sample entity data, sample facet data, sample label data, sample triplet and sample key-value pair will be explained respectively.
[0076] (1-1) Sample entity data is used to represent entities of data objects. It should be understood that an entity is an individual data object. For example, an entity can be a specific person or thing, or it can be an abstract concept.
[0077] In some embodiments, the sample entity data is obtained by processing the sample reference information through at least one of entity recognition processing, lexical analysis processing, and term mining processing.
[0078] Entity recognition processing refers to using entity references to identify different types of entities. It should be noted that an entity reference refers to a reference to an entity in natural language text, specifically a named entity, a nominal entity, or a pronominal entity, etc. This disclosure does not limit the type of entity reference.
[0079] In some embodiments, the electronic device utilizes a general mention recognition tool to perform entity recognition processing on the sample reference information to obtain the sample entity data. For example, see [link to example]. Figure 5The entity sample set is used to refer to the sample entity data. Accordingly, the general mention recognition tool is used to perform entity recognition processing on each resource (such as resource 1, ..., resource n, where n is an integer greater than 1), which can achieve high recall of entity samples, thereby obtaining a rich entity sample set, which is the above-mentioned sample entity data.
[0080] Lexical analysis refers to lexical analysis based on a terminology dictionary in order to identify different types of entities based on the results of the lexical analysis.
[0081] In some embodiments, the electronic device utilizes a Lexer lexical analyzer to perform lexical analysis on the sample reference information to obtain the sample entity data. For example, see [link to example]. Figure 5 By using the Lexer lexical analyzer based on a terminology dictionary to perform lexical analysis on each resource, an entity sample set can be obtained, which is the aforementioned sample entity data.
[0082] The term mining process refers to extracting information from large-scale datasets.
[0083] In some embodiments, the electronic device utilizes terminology mining tools to perform terminology mining processing on the sample reference information to obtain the sample entity data. For example, see [link to example]. Figure 5 By using terminology mining tools to process the terminology of various resources, we can mine entity-related text or entity pairs with relationships in the sample reference information, thereby obtaining an entity sample set, which is the aforementioned sample entity data.
[0084] In the above embodiments, multiple implementation methods for sample construction processing are provided. Among them, entity recognition processing, lexical analysis processing, or term mining processing can all generate sample entity data quickly and efficiently, thereby improving the efficiency of data generation.
[0085] (1-2) Sample faceted data is used to characterize the data object from different dimensions. For example, taking a person as the entity of the data object, the sample faceted data can characterize the data object from different dimensions such as gender, place of origin, place of birth, or birthday. It should be noted that the relevant information of the person in this embodiment comes from a public dataset.
[0086] In some embodiments, the sample faceted data is obtained by retrieving search terms generated from the sample reference information. Accordingly, the process of generating the sample faceted data may be as follows: an electronic device uses industry data resources in the sample reference information to generate search terms corresponding to different facets, performs searches in the industry data resources according to the search terms corresponding to the different facets, obtains the search results corresponding to the different facets, and collects the search results corresponding to the different facets as the sample faceted data.
[0087] For example, see Figure 5 The faceted sample set refers to the faceted sample data. Accordingly, industry terminology from industry data resources can be used to generate search terms corresponding to different facets (which can be understood as search terms of different dimensions). Then, according to the search terms corresponding to different facets, searches are performed in the industry documents of the industry data resources to obtain the search results corresponding to those different facets (i.e., Figure 5 The search results for each facet are collected to form a facet sample set. In some embodiments, the above search process can be implemented based on a general model, that is, by using industry documents and industry terminology from the industry data resources to construct a general model, and then inputting the search terms corresponding to each facet into the general model, performing the search through the general model, and outputting the search results corresponding to each facet. In this way, by constructing a general model and then using the general model to implement the above search process, not only can the search efficiency be improved, but the search results can also be effectively improved, thereby obtaining a rich sample facet data.
[0088] (1-3) Sample label data is used to characterize the entity features of the data object.
[0089] In some embodiments, the sample label data is generated based on the summary information in the sample reference information. This summary information may be summary text or summary documents maintained in a summary repository, etc.
[0090] For example, see Figure 5 The term "label sample set" refers to the sample label data. Correspondingly, by extracting keywords from a summary library or summary document for different data objects, and using these extracted keywords as label samples for those different data objects, a label sample set is generated, thus obtaining the aforementioned sample label data. It should be understood that the keywords extracted in this way typically yield positive example samples of the data objects. However, in some embodiments, to ensure a balanced distribution of positive and negative examples, it is also necessary to obtain negative example samples of the data objects. For example, this can be achieved by extracting other information different from the positive example from the entity sample set as negative example samples of the data object.
[0091] (1-4) Sample triples are used to represent the data object in the form of triples.
[0092] In some embodiments, the sample triple can be an SPO (Subject-Predication-Object) triple. This SPO triple indicates the value of a specific attribute of an entity. For example, if the entity of a data object is ×Person×, the attribute is gender, and the gender is male, the sample triple can be represented as ×Person×-Gender-Male. In some embodiments, the sample triple is generated based on the entity information associated with the sample entity data. In some embodiments, the entity information associated with the sample entity data can be the attribute information of the entity corresponding to the sample entity data.
[0093] (1-5) Sample key-value pairs are used to represent the data object in the form of key-value pairs.
[0094] In some embodiments, the sample key-value pair can be a key-value pair. For example, with the key being gender and the value being male / female, the sample key-value pair can be represented as gender-male / female. In some embodiments, the sample key-value pair is generated based on the entity information associated with the sample entity data.
[0095] In the above embodiments, the sample construction process not only enables the rapid and efficient generation of a large amount of basic sample data, but also generates various types of basic sample data. This improves data construction efficiency and enriches the types of data produced. Furthermore, this basic sample data can support rapid iterative training of the model.
[0096] (2) In this embodiment of the disclosure, the noise data is obtained by performing data augmentation processing on the basic sample data.
[0097] Data augmentation refers to generating more data based on limited data.
[0098] In the above embodiments, data augmentation can increase the quantity and diversity of sample data, and then the augmented sample data can be used for iterative training of the model, which can effectively improve the robustness of the content understanding model.
[0099] (3) In this embodiment of the disclosure, the difficult sample data is obtained by performing difficult sample mining processing on the basic sample data.
[0100] Difficult samples can be either difficult positive or difficult negative samples. It should be understood that the basic sample data generated through sample construction processing is usually simple samples. Therefore, to ensure the training effect of the model, as many difficult positive or difficult negative samples as possible are usually mined to participate in the model training. This ensures a balanced distribution of sample data and thus improves the training effect of the model.
[0101] In some embodiments, the above-mentioned hard sample mining process includes: an electronic device inputting the basic sample data into a hard sample mining model, performing hard sample mining processing on the basic sample data through the hard sample mining model to obtain the hard sample data, wherein the hard sample mining model provides the function of hard sample mining.
[0102] In the above embodiments, by performing hard sample mining, difficult samples can be extracted from the basic sample data, increasing the amount of data generated. This allows for subsequent iterative training of the model using the hard sample mining data, effectively improving the generalization ability and robustness of the content understanding model. Furthermore, by constructing a hard sample mining model, difficult samples can be extracted from the basic sample data quickly and efficiently, improving both the efficiency and accuracy of hard sample mining.
[0103] In some embodiments, the electronic device constructs a data model, and uses this data model to execute the process described in S402 above, which generates sample data based on sample reference information. For example, Figure 6 This is a schematic diagram illustrating a data model according to an embodiment of this disclosure. See also... Figure 6 The data model can include a sample construction module, a data augmentation module, and a hard sample mining module. The sample construction module processes the sample reference information to obtain basic sample data. The data augmentation module performs data augmentation on the basic sample data to obtain noisy data. The hard sample mining module performs hard sample mining on the basic sample data to obtain hard sample data.
[0104] For the sample construction module, in Figure 6The document also exemplifies knowledge graphs, knowledge corpora, and knowledge documents. Taking a person as an example, the knowledge graph can be a person-related graph, the knowledge corpus can be a person-related corpus, and the knowledge document can be a person-related document. Furthermore, by combining the person-related graph, the person-related corpus, and the person-related document, sample data related to a person can be constructed. Similarly, taking a device as an example, the knowledge graph can be a device-related graph, the knowledge corpus can be a device-related corpus, and the knowledge document can be a device-related document. Furthermore, by combining the device-related graph, the device-related corpus, and the device-related document, sample data related to a device can be constructed.
[0105] For the data augmentation module, in Figure 6 The example provided illustrates data augmentation for classifying power transformers, using the entity of the data object as an example. For instance, data augmentation can be performed based on the English definition of a power transformer (Powertransformer), or based on different descriptions of power transformer classifications (power transformer categorization or power transformer types). This disclosure does not limit the specific implementation method of data augmentation.
[0106] For the difficult sample mining module, in Figure 6 In this paper, taking lightning protection devices (including lightning rods or lightning conductors) as an example of data objects, an example of difficult sample mining for such lightning protection devices is also shown. For example, assuming that the lightning protection device is the data target, among the direct lightning strike lightning rods and early discharge lightning rods derived from lightning rods, direct lightning strike lightning rods can be used as difficult positive examples. Among the copper-clad steel lightning conductors, lead-clad steel lightning conductors, and overhead lightning conductors derived from lightning conductors, copper-clad steel lightning conductors and lead-clad steel lightning conductors can be used as difficult negative examples.
[0107] The above embodiments provide multiple implementation methods for data generation. Among them, sample data can be generated quickly and efficiently through sample construction processing, data augmentation processing, and hard sample mining processing, which enriches the data types generated and improves the effect of data generation.
[0108] S403. The electronic device inputs the sample data into the content understanding model obtained after the previous iteration of training to obtain the content understanding results output by the current iteration of training.
[0109] In some embodiments, the electronic device inputs the sample data into the content understanding model obtained after the previous iteration of training, and uses the content understanding model to perform content recognition on the sample data to obtain the content understanding result output by the current iteration of training.
[0110] S404. The electronic device adjusts the model parameters of the content understanding model based on the content understanding results output from this iteration of training and the sample information in the sample data to complete this training of the model. The sample information is used to indicate the content information of the sample data.
[0111] By adjusting the model parameters as described above, the content understanding model can be continuously optimized, thereby training a content understanding model with better content understanding capabilities.
[0112] In this embodiment of the disclosure, the content understanding model includes at least one of a basic content understanding model, a general content understanding model, and an industry-specific content understanding model.
[0113] The basic content understanding model is trained using a unified multi-task training method; the general content understanding model is trained using general data resources; and the industry-specific content understanding model is trained using industry-specific data resources. By training the basic content understanding model using a unified multi-task training method, and then training the general and industry-specific content understanding models based on it, multiple different types of content understanding tasks can be unified, eliminating the need to build separate models for different content understanding tasks and reducing model construction costs.
[0114] For example, Figure 7 This is a schematic diagram illustrating the structure of a basic content understanding model according to an embodiment of this disclosure. See also... Figure 7 In some embodiments, the basic content understanding model can be constructed based on the Ernie model (Enhanced Representation from Knowledge Integration). The Ernie model enhances the model's semantic representation capabilities by masking semantic units such as words or entities, enabling the model to learn the semantic representation of complete concepts. Building upon the Ernie model, the basic content understanding model also includes an Encoder layer, which can be a fully connected layer. Furthermore, the input to this basic content understanding model can include the CLS flag, Prompt, SEP flag, and data content of the data resource. Taking text as an example, the CLS flag is typically located at the beginning of the text and is used for subsequent downstream tasks. The SEP flag is used to separate two input texts. The Prompt is an input format or template designed for the model's downstream tasks, controlling the model's output to solve various downstream tasks.
[0115] In the above embodiments, building a basic content understanding model based on the Ernie model and Prompt can better improve the model's performance and transferability, thus making it more suitable for industry migration. Compared to traditional industry content understanding methods that build different models for different knowledge point types, this disclosure embodiment, by building a basic content understanding model, can unify multiple content understanding tasks, reduce model building costs, and facilitate industry migration.
[0116] For example, Figure 8 This is a schematic diagram illustrating an iterative optimization of a model according to an embodiment of this disclosure. See also... Figure 8 By constructing a general content understanding model and at least one industry-specific content understanding model (such as...) Figure 8 (As shown in the examples of industries A and B, etc.), new data obtained through data production is used to iteratively train both the general content understanding model and the industry-specific content understanding model. This allows for iterative optimization of both the general and industry-specific content understanding models simultaneously. Furthermore, by continuously iterating and optimizing these models, feedback is provided to the data models from both general and industry data dimensions, creating a closed loop for data optimization across both dimensions. This accelerates the production of high-quality data and drives the continuous optimization and upgrading of both the general and industry-specific content understanding models, thereby lowering the application threshold in industry scenarios and accelerating industry migration.
[0117] For example, Figure 9 This is a schematic diagram illustrating a closed-loop process for data generation and content understanding, as shown in an embodiment of this disclosure. See also... Figure 9 Through data models, utilizing general / industry knowledge graphs and corpora, large-scale, high-quality data is automatically constructed. Simultaneously, based on the construction of a basic content understanding model, general and industry-specific content understanding models are also built. The basic content understanding model possesses small-sample capability and transfer learning ability. Furthermore, the data generated by the data models drives iterative optimization of the general and industry-specific content understanding models, achieving optimization for both general and industry scenarios. Moreover, the content understanding models also provide feedback and optimize the data models, improving the efficiency and quality of data generation. Thus, the data generation and content understanding processes form a closed-loop data optimization system, achieving mutual optimization and enhancing both data generation and content understanding.
[0118] S405. The electronic device stops the iterative training when the preset conditions are met.
[0119] It should be understood that after each iteration of training, it is necessary to determine whether the model training has met the preset conditions. If the model training has met the preset conditions, the model training is stopped and the model obtained from this iteration is used as the content understanding model. If the model training has not met the preset conditions, the next iteration of training is continued.
[0120] In some embodiments, the preset conditions include at least one of the following conditions: the amount of generated sample data is greater than or equal to a preset amount of data; the sample balance of the generated sample data is greater than or equal to a preset balance, which is used to measure the degree of balance of the sample distribution; the number of iterations is greater than or equal to a preset number of iterations; and the loss value of the content understanding model is less than a preset threshold.
[0121] The preset data volume is a pre-defined amount of data, such as 100,000. This embodiment of the present disclosure does not limit the setting of the preset data volume. The preset balance is a pre-defined balance, such as 0.5. This embodiment of the present disclosure does not limit the setting of the preset balance. The preset number of iterations is a pre-defined number of training iterations, such as 100 iterations. This embodiment of the present disclosure does not limit the setting of the preset number of iterations. The preset threshold is a pre-defined fixed threshold, such as a model loss value less than 0.0001. This embodiment of the present disclosure does not limit the setting of the preset threshold.
[0122] In the above embodiments, various types of preset conditions are provided to ensure that model training stops only when the preset conditions are met. Specifically, by setting preset conditions from the perspective of data volume or balance, it can be ensured that the amount of generated data is sufficient and the quality of the generated data is high. By setting preset conditions from the perspective of model iteration count or model loss value, the training effect of the content understanding model can be ensured, thereby obtaining a content understanding model with better content understanding ability.
[0123] Based on the embodiments shown in S401 to S405 above, a content understanding model with superior content understanding capabilities can be trained. Furthermore, the electronic device can utilize the content understanding model to perform content recognition on data resources to be identified. The corresponding process may be: the electronic device acquires the data resources to be identified, inputs the data resources into the content understanding model, and performs content recognition on the data resources through the content understanding model to obtain the content understanding result of the data resources, thereby improving the understanding of the data.
[0124] The technical solution provided in this disclosure utilizes sample reference information to generate sample data, enabling automated sample data generation and significantly improving data generation efficiency. This sample data drives the iterative optimization of the content understanding model. Simultaneously, the content understanding results output by the model guide the data generation process, improving the quality of the sample data. Furthermore, higher-quality sample data can serve as new input to the content understanding model, further optimizing its iterative process and resulting in a model with superior content understanding capabilities for better data comprehension. Thus, the data generation and content understanding processes form an optimization loop, achieving dual optimization of both data generation and content understanding.
[0125] Figure 10 This is a structural block diagram of a training device for a content understanding model, as shown in an embodiment of this disclosure. See also... Figure 10 The device includes a training module 1001. Wherein:
[0126] Training module 1001 is used to iteratively train the initial model to obtain a content understanding model, which is used to perform content recognition on data resources to obtain the content understanding results of the data resources.
[0127] In any iteration of training, the training module 1001 includes:
[0128] The generation submodule 10011 is used to generate sample data based on sample reference information; wherein, in response to any iteration training being the first iteration training, the sample reference information includes preset data resources, and in response to any iteration training being subsequent iteration training, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration training.
[0129] Input submodule 10012 is used to input the sample data into the content understanding model obtained after the previous iteration of training in order to complete the current training of the model.
[0130] The technical solution provided in this disclosure utilizes sample reference information to generate sample data, enabling automated sample data generation and significantly improving data generation efficiency. This sample data drives the iterative optimization of the content understanding model. Simultaneously, the content understanding results output by the model guide the data generation process, improving the quality of the sample data. Furthermore, higher-quality sample data can serve as new input to the content understanding model, further optimizing its iterative process and resulting in a model with superior content understanding capabilities for better data comprehension. Thus, the data generation and content understanding processes form an optimization loop, achieving dual optimization of both data generation and content understanding.
[0131] In some embodiments, the sample data includes at least one of basic sample data, noisy data, and difficult sample data;
[0132] Specifically, the basic sample data is obtained by performing sample construction processing on the sample reference information; the noisy data is obtained by performing data augmentation processing on the basic sample data; and the difficult sample data is obtained by performing difficult sample mining processing on the basic sample data.
[0133] In some embodiments, the basic sample data includes sample entity data, sample facet data, sample label data, sample triples, and sample key-value pairs;
[0134] Among them, the sample entity data is used to represent the entity of the data object; the sample faceted data is used to represent the data object from different dimensions; the sample label data is used to represent the entity features of the data object; the sample triple is used to represent the data object in the form of triples; and the sample key-value pair is used to represent the data object in the form of key-value pairs.
[0135] In some embodiments, the sample entity data is obtained by processing the sample reference information through at least one of entity recognition processing, lexical analysis processing, and term mining processing; the sample triples are generated based on the entity information associated with the sample entity data; the sample key-value pairs are generated based on the entity information associated with the sample entity data; the sample tag data is generated based on the summary information in the sample reference information; and the sample faceted data is obtained by retrieving search terms generated from the sample reference information.
[0136] In some embodiments, the generation submodule includes a sample mining submodule, for:
[0137] The basic sample data is input into the hard sample mining model, which then performs hard sample mining on the basic sample data to obtain the hard sample data. The hard sample mining model provides the function of hard sample mining.
[0138] In some embodiments, the input submodule 10012 is configured to:
[0139] Input the sample data into the content understanding model obtained after the previous iteration of training to obtain the content understanding results output by the current iteration of training.
[0140] Based on the content understanding results output from this iteration of training and the sample information in the sample data, the model parameters of the content understanding model are adjusted. The sample information is used to indicate the content information of the sample data.
[0141] In some embodiments, the content understanding model includes at least one of a basic content understanding model, a general content understanding model, and an industry-specific content understanding model;
[0142] The basic content understanding model is trained using a multi-task unified training method; the general content understanding model is trained using general data resources; and the industry-specific content understanding model is trained using industry-specific data resources.
[0143] In some embodiments, the training module 1001 is further configured to:
[0144] If the preset conditions are met, the iterative training will be stopped.
[0145] The preset conditions include at least one of the following conditions:
[0146] The amount of generated sample data is greater than or equal to the preset amount of data;
[0147] The sample balance of the generated sample data is greater than or equal to the preset balance, which is used to measure the degree of balance of the sample distribution.
[0148] The number of iterations is greater than or equal to the preset number;
[0149] The content comprehension model's loss value is less than a preset threshold.
[0150] Figure 11 This is a structural block diagram of a content understanding device according to an embodiment of this disclosure. See also... Figure 11 The device includes an acquisition module 1101 and an identification module 1102. Wherein:
[0151] The acquisition module 1101 is used to acquire data resources to be recognized by content;
[0152] The recognition module 1102 is used to input the data resource into the content understanding model, and to perform content recognition on the data resource through the content understanding model to obtain the content understanding result of the data resource.
[0153] The content understanding model is obtained by iteratively training an initial model using sample data. The sample data is generated based on sample reference information. In response to the first iteration of training, the sample reference information includes preset data resources. In response to subsequent iterations of training, the sample reference information includes the preset data resources and the content understanding results output from the previous iteration.
[0154] The technical solution provided in this disclosure utilizes sample reference information to generate sample data, enabling automated sample data generation and significantly improving data generation efficiency. This sample data drives the iterative optimization of the content understanding model. Simultaneously, the content understanding results output by the model guide the data generation process, improving the quality of the sample data. Furthermore, higher-quality sample data can serve as new input to the content understanding model, further optimizing its iterative process and resulting in a model with superior content understanding capabilities for better data comprehension. Thus, the data generation and content understanding processes form an optimization loop, achieving dual optimization of both data generation and content understanding.
[0155] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the training method or content understanding method of the content understanding model provided in the present disclosure.
[0156] According to embodiments of this disclosure, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause an electronic device to execute a training method or content understanding method for a content understanding model provided in this disclosure.
[0157] According to embodiments of this disclosure, this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the training method or content understanding method of the content understanding model provided in this disclosure.
[0158] In some embodiments, the electronic device may be as described above. Figure 1 The terminal or server shown. Figure 12A schematic block diagram of an example electronic device 1200 that can be used to implement embodiments of the present disclosure is shown. Electronic device 1200 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 1200 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0159] like Figure 12 As shown, the electronic device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 12012 into a random access memory (RAM) 1203. The RAM 1203 may also store various programs and data required for the operation of the device 1200. The computing unit 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0160] Multiple components in electronic device 1200 are connected to I / O interface 1205, including: input unit 1206, such as keyboard, mouse, etc.; output unit 1207, such as various types of displays, speakers, etc.; storage unit 1208, such as disk, optical disk, etc.; and communication unit 1209, such as network card, modem, wireless transceiver, etc. Communication unit 1209 allows device 1200 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0161] The computing unit 1201 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing unit 1201 performs the various methods and processes described above, such as methods for training content understanding models or content understanding methods. For example, in some embodiments, methods for training content understanding models or content understanding methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 1200 via ROM 1202 and / or communication unit 1209. When the computer program is loaded into RAM 1203 and executed by computing unit 1201, one or more steps of the training method or content understanding method of the content understanding model described above can be performed. Alternatively, in other embodiments, computing unit 1201 can be configured to perform the training method or content understanding method of the content understanding model by any other suitable means (e.g., by means of firmware).
[0162] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard parts (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0163] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0164] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory (EPROM or flash memory), optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0165] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user, such as a cathode ray tube (CRT) or liquid crystal display (LCD) monitor; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0166] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0167] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0168] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.
[0169] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for training a content understanding model, comprising: iteratively training an initial model to obtain a content understanding model, the content understanding model being configured to perform content recognition on a data resource to obtain a content understanding result of the data resource, the data resource being in a form of text, picture or video; wherein each iteration training comprises the following process: generating sample data according to sample reference information; wherein, in response to the each iteration training being a first iteration training, the sample reference information comprises a preset data resource, and in response to the each iteration training being an iteration training after the first iteration training, the sample reference information comprises the preset data resource and a content understanding result output by a previous iteration training; the sample data comprises at least one of basic sample data, noise data and difficult sample data; wherein, the basic sample data is obtained by performing sample construction processing on the sample reference information; the noise data is obtained by performing data enhancement processing on the basic sample data; the difficult sample data is obtained by performing difficult sample mining processing on the basic sample data; the basic sample data comprises sample entity data, sample facet data, sample label data, sample triple and sample key-value pair; wherein, the sample entity data is configured to represent an entity of a data object; the sample facet data is configured to represent the data object from different dimensions; the sample label data is configured to represent an entity feature of the data object; the sample triple is configured to represent the data object in a form of triple; and the sample key-value pair is configured to represent the data object in a form of key-value pair; inputting the sample data into the content understanding model obtained after the previous iteration training to obtain a content understanding result output by the current iteration training; and adjusting model parameters of the content understanding model according to the content understanding result output by the current iteration training and sample information in the sample data, the sample information being configured to indicate content information of the sample data.
2. The method of claim 1, wherein, the sample entity data is obtained by performing at least one of entity recognition processing, lexical analysis processing and term mining processing on the sample reference information; the sample triple is generated according to entity information associated with the sample entity data; the sample key-value pair is generated according to entity information associated with the sample entity data; the sample label data is generated according to summary information in the sample reference information; and the sample facet data is obtained by searching using search terms generated from the sample reference information.
3. The method of claim 1, wherein, the process of the difficult sample mining processing comprises: inputting the basic sample data into a difficult sample mining model, performing difficult sample mining processing on the basic sample data by the difficult sample mining model to obtain the difficult sample data, the difficult sample mining model being provided with a function of difficult sample mining.
4. The method according to any one of claims 1 to 3, wherein, the content understanding model comprises at least one of a basic content understanding model, a general content understanding model and an industry content understanding model. The basic content understanding model is trained in a multi-task unified training manner; the general content understanding model is obtained by training the basic content understanding model according to general data resources; and the industry content understanding model is obtained by training the basic content understanding model according to industry data resources.
5. The method of any one of claims 1-3, further comprising: stopping the iterative training when a preset condition is met; wherein the preset condition comprises at least one of the following conditions: a data amount of the generated sample data is greater than or equal to a preset data amount; a sample balance degree of the generated sample data is greater than or equal to a preset balance degree, the sample balance degree being used to measure a balance degree of sample distribution; an iteration number is greater than or equal to a preset number; or a loss value of the content understanding model is less than a preset threshold.
6. A content understanding method, comprising: obtaining a data resource to be subjected to content identification, the data resource being in a form of text, picture or video; inputting the data resource into a content understanding model, and performing content identification on the data resource by the content understanding model to obtain a content understanding result of the data resource; wherein the content understanding model is obtained by iteratively training an initial model using sample data, the sample data being generated according to sample reference information, the sample reference information comprising a preset data resource in response to a first iteration training, and the sample reference information comprising the preset data resource and a content understanding result output by a previous iteration training in response to an iteration training after the first iteration training; the sample data comprising at least one of basic sample data, noise data and difficult sample data, the basic sample data being obtained by performing sample construction processing on the sample reference information, the noise data being obtained by performing data enhancement processing on the basic sample data, and the difficult sample data being obtained by performing difficult sample mining processing on the basic sample data; the basic sample data comprising sample entity data, sample facet data, sample label data, sample triple and sample key-value pair, the sample entity data being used to represent an entity of a data object, the sample facet data being used to represent the data object from different dimensions, the sample label data being used to represent an entity feature of the data object, the sample triple being used to represent the data object in a form of triple, and the sample key-value pair being used to represent the data object in a form of key-value pair.
7. A training device of a content understanding model, comprising: a training module configured to iteratively train an initial model to obtain a content understanding model, the content understanding model being configured to perform content identification on a data resource to obtain a content understanding result of the data resource, the data resource being in a form of text, picture or video; wherein, in any iteration training process, the training module comprises: The generating sub-module is configured to generate sample data according to sample reference information; wherein, in response to the current iteration training being the first iteration training, the sample reference information comprises a preset data resource; in response to the current iteration training being iteration training after the first iteration training, the sample reference information comprises the preset data resource and a content understanding result output by the last iteration training; the sample data comprises at least one of basic sample data, noise data and difficult sample data; wherein, the basic sample data is obtained by performing sample construction processing on the sample reference information; the noise data is obtained by performing data enhancement processing on the basic sample data; the difficult sample data is obtained by performing difficult sample mining processing on the basic sample data; the basic sample data comprises sample entity data, sample facet data, sample label data, sample triple and sample key-value pair; wherein, the sample entity data is used to represent an entity of a data object; the sample facet data is used to represent the data object from different dimensions; the sample label data is used to represent an entity feature of the data object; the sample triple is used to represent the data object in the form of a triple; and the sample key-value pair is used to represent the data object in the form of a key-value pair. The input sub-module is configured to input the sample data into a content understanding model obtained after the last iteration training, to obtain a content understanding result output by the current iteration training; and adjust model parameters of the content understanding model according to the content understanding result output by the current iteration training and sample information in the sample data, wherein the sample information is used to indicate content information of the sample data.
8. The apparatus of claim 7, wherein, The sample entity data is obtained by performing at least one of entity recognition processing, morphological analysis processing and term mining processing on the sample reference information. The sample triple is generated according to entity information associated with the sample entity data; the sample key-value pair is generated according to entity information associated with the sample entity data; the sample label data is generated according to summary information in the sample reference information; and the sample facet data is obtained by searching using a search term generated from the sample reference information.
9. The apparatus of claim 7, wherein, The generating sub-module comprises a sample mining sub-module configured to: input the basic sample data into a difficult sample mining model, perform difficult sample mining processing on the basic sample data by using the difficult sample mining model, and obtain the difficult sample data, wherein the difficult sample mining model is provided with a function of difficult sample mining.
10. The apparatus of any one of claims 7 to 9, wherein, The content understanding model comprises at least one of a basic content understanding model, a general content understanding model and an industry content understanding model; wherein, the basic content understanding model is trained in a multi-task unified training manner; the general content understanding model is obtained by training the basic content understanding model according to general data resources; and the industry content understanding model is obtained by training the basic content understanding model according to industry data resources.
11. A content understanding apparatus, comprising: An acquisition module is configured to acquire a data resource to be subjected to content recognition, the data resource being in the form of text, a picture, or a video. An identification module is configured to input the data resource into a content understanding model, and perform content recognition on the data resource by using the content understanding model to obtain a content understanding result of the data resource. The content understanding model is obtained by iteratively training an initial model by using sample data; the sample data is generated according to sample reference information; in response to a first iteration training, the sample reference information includes preset data resources; in response to an iteration training after the first iteration training, the sample reference information includes the preset data resources and a content understanding result output by a previous iteration training; the sample data includes at least one of basic sample data, noise data, and difficult sample data; the basic sample data is obtained by performing sample construction processing on the sample reference information; the noise data is obtained by performing data enhancement processing on the basic sample data; the difficult sample data is obtained by performing difficult sample mining processing on the basic sample data; the basic sample data includes sample entity data, sample facet data, sample label data, sample triplets, and sample key-value pairs; the sample entity data is used to represent an entity of a data object; the sample facet data is used to represent the data object from different dimensions; the sample label data is used to represent an entity feature of the data object; the sample triplets are used to represent the data object in the form of triplets; and the sample key-value pairs are used to represent the data object in the form of key-value pairs.
12. An electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 6.
13. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the electronic device to perform the method of any one of claims 1 to 6.
14. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Semantic comprehension model training method, semantic comprehension method and device and storage medium
CN110795945A
Model optimization method and device, electronic equipment and storage medium
CN111753914A