Label processing method and device, computer device, storage medium and program product
By extracting and updating text and tag features on news platforms and combining them with the co-occurrence relationships of historical data, the problem of insufficient tag processing in traditional models when dealing with breaking news events is solved, and more accurate information recommendation is achieved.
Patent Information
- Application Number
- CN202210962568.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-11
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-08-11
AI Technical Summary
Traditional multi-class deep learning models are unable to quickly and accurately label, identify, and display tags when dealing with breaking news events or trending topics, resulting in insufficient accuracy in information recommendation.
By extracting text and tag features from media data, updating features using a tag fusion model, and combining the co-occurrence relationships of historical media data, target tags that meet the similarity criteria are selected.
It improves the accuracy of tags and the personalization of information recommendations, ensuring that users can quickly obtain useful information.
Smart Images

Figure CN115344698B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a label processing method and device, computer equipment, a storage medium and a program product. BACKGROUND
[0002] With the development of artificial intelligence technology and the popularization and use of Internet applications, in the actual application process, due to the existence of massive data and interference information, etc., the application platforms such as news platforms, shopping platforms, etc. cannot efficiently manage information, and cannot accurately determine the information or data required by different users.
[0003] Taking a news platform as an example, due to the increasing growth of media data of the platform and the lack of efficient management of media data, it increases the difficulty for users to obtain effective information, so there is a way to add different content labels to the text of media data, so that users can quickly and accurately obtain the required information according to the content label.
[0004] However, the inventors have found that the traditional way of adding content labels and information recommendation usually uses a multi-classification deep learning model, and the classification number of the multi-classification deep learning model is usually fixed and small. For the case of news breaking events or hot events, the traditional multi-classification model does not support label labeling, recognition and display of a large number of newly added breaking events, and there is still a problem of being unable to quickly and accurately obtain effective information. The accuracy of label processing and information recommendation for media data still needs to be improved. SUMMARY
[0005] Therefore, it is necessary to provide a label processing method, device, computer equipment, computer readable storage medium and computer program product capable of improving the accuracy of the determined label of media data and the information recommendation effect.
[0006] In a first aspect, the present application provides a label processing method. The method comprises:
[0007] extracting text features of a text and label features of each candidate label contained in the text from media data containing the text;
[0008] updating each label feature based on a first feature similarity between the label features to obtain a first updated label feature;
[0009] updating the first updated label feature according to a co-occurrence relationship of each candidate label in historical media data to obtain a second updated label feature;
[0010] determine, as the label of the media data, a target label of each of the candidate labels that meets a similarity condition based on a second feature similarity between each of the secondary updated label features and the text feature.
[0011] In one of the embodiments, the method further comprises: determining a corresponding preset similarity threshold according to the preset similarity condition, and screening a target similarity greater than the preset similarity threshold from each of the second feature similarities; or sorting each of the second feature similarities according to the similarity value, obtaining a corresponding feature similarity sequence, and screening a preset number of target similarities from the feature similarity sequence according to the preset similarity condition.
[0012] In a second aspect, the present application further provides a label processing device. The device comprises:
[0013] an extraction module configured to extract, from media data containing text, a text feature of the text and a label feature of each candidate label contained in the text, respectively;
[0014] a primary updating module configured to update each of the label features based on a first feature similarity between the label features, to obtain a primary updated label feature;
[0015] a secondary updating module configured to update the primary updated label features according to a co-occurrence relationship of the candidate labels in historical media data, to obtain secondary updated label features;
[0016] a label screening module configured to determine, as the label of the media data, a target label of each of the candidate labels that meets a similarity condition based on a second feature similarity between each of the secondary updated label features and the text feature.
[0017] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0018] extract, from media data containing text, a text feature of the text and a label feature of each candidate label contained in the text, respectively;
[0019] update each of the label features based on a first feature similarity between the label features, to obtain a primary updated label feature;
[0020] updating the initial updated label features according to co-occurrence relationships of the candidate labels in historical media data, to obtain second updated label features;
[0021] determining, based on a second feature similarity between each of the second updated label features and the text feature, a target label in the candidate labels that satisfies a similarity condition on the second feature similarity as the label of the media data.
[0022] In a fourth aspect, the present application also provides a computer readable storage medium. The computer readable storage medium has a computer program stored thereon, and the computer program, when executed by a processor, implements the following steps:
[0023] extracting, from media data containing text, a text feature of the text and a label feature of each candidate label contained in the text, respectively;
[0024] updating the label features based on a first feature similarity between the label features, to obtain initial updated label features;
[0025] updating the initial updated label features according to co-occurrence relationships of the candidate labels in historical media data, to obtain second updated label features;
[0026] determining, based on a second feature similarity between each of the second updated label features and the text feature, a target label in the candidate labels that satisfies a similarity condition on the second feature similarity as the label of the media data.
[0027] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and the computer program, when executed by a processor, implements the following steps:
[0028] extracting, from media data containing text, a text feature of the text and a label feature of each candidate label contained in the text, respectively;
[0029] updating the label features based on a first feature similarity between the label features, to obtain initial updated label features;
[0030] updating the initial updated label features according to co-occurrence relationships of the candidate labels in historical media data, to obtain second updated label features;
[0031] determining, based on a second feature similarity between each of the second updated label features and the text feature, a target label in the candidate labels that satisfies a similarity condition on the second feature similarity as the label of the media data.
[0032] In the label processing method, the device, the computer equipment, the storage medium and the computer program product, the text features of the text and the label features of each candidate label contained in the text are extracted from the media data containing the text, the label features are updated based on the first feature similarity between the label features, the initial updated label features are obtained, the relevance between the initial updated label features is improved, the initial updated label features are updated based on the co-occurrence relationship of the candidate labels in the historical media data, the secondary updated label features are obtained, and the relevance between the secondary updated label features is further improved. Finally, the target label that meets the similarity condition in the second feature similarity between each secondary updated label feature and the text feature is determined as the label of the media data based on the second feature similarity, the relevance between the determined label of the media data and the media data is improved, the situation that the use object cannot accurately obtain effective information due to low label relevance is avoided, and the personalized recommendation effect when each use object is recommended based on the media data is further improved. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 An application environment diagram of a label processing method in an embodiment;
[0034] Figure 2 A flowchart of a label processing method in an embodiment;
[0035] Figure 3 A flowchart of updating the initial updated label features to obtain the secondary updated label features in an embodiment;
[0036] Figure 4 A flowchart of constructing a label co-occurrence relationship diagram based on the co-occurrence relationship between the candidate labels in the historical media data in an embodiment;
[0037] Figure 5 An initial co-occurrence relationship diagram established based on the candidate labels and the co-occurrence probability between the candidate labels in an embodiment;
[0038] Figure 6 A label co-occurrence relationship diagram obtained by screening based on the probability condition in an embodiment;
[0039] Figure 7 A flowchart of a training process of a label fusion model in an embodiment;
[0040] Figure 8 An architecture diagram of a label fusion model in an embodiment;
[0041] Figure 9 a flowchart of a label processing method in another embodiment;
[0042] Figure 10 a structural block diagram of a label processing device in an embodiment;
[0043] Figure 11 an internal structural diagram of a computer device in an embodiment. DETAILED DESCRIPTION
[0044] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0045] The label processing method provided by the embodiments of the present application relates to artificial intelligence technology, wherein the artificial intelligence (Artificial Intelligence, AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive environment, obtain knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making. Artificial intelligence technology is a comprehensive discipline, which involves a wide range of fields, including both hardware and software technologies. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology and machine learning / deep learning, etc.
[0046] Among them, nature language processing (Nature Language processing, NLP) is an important direction in the field of computer science and artificial intelligence. It studies various theories and methods that can realize effective communication between people and computers with natural language. Natural language processing is a science that integrates linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, that is, the language used in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question and answer, knowledge graph and other technologies. With the research and progress of artificial intelligence technology, artificial intelligence technology is researched and applied in many fields, such as common smart home, smart wearable device, virtual assistant, smart sound box, smart marketing, unmanned vehicle, automatic driving, unmanned aerial vehicle, robot, intelligent medical treatment, intelligent customer service and the like. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play more and more important value.
[0047] The label processing method provided by the embodiments of the present application is particularly related to natural language processing technology in artificial intelligence technology, and can be applied to, for example Figure 1The application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data required by the server 104 to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The server 104 extracts the text features of the text and the label features of each candidate label contained in the text from the media data containing the text respectively, and updates each label feature based on the first feature similarity between the label features to obtain the initial updated label feature. Among them, the media data containing the text can be stored in the local storage of the terminal 102, or stored in the data storage system or the cloud storage associated with the server 104. When the label processing is needed, the server 104 can obtain the media data containing the text from the local storage of the terminal 102, or the data storage system, or the cloud storage. Further, the server 104 updates the initial updated label feature according to the co-occurrence relationship of each candidate label in the historical media data to obtain the second updated label feature, and determines the target label that meets the similarity condition in the second feature similarity between each second updated label feature and the text feature as the label of the media data. After screening the labels of the media data, the server 104 can display the labels as the explicit labels of the media data on the terminal 102, so that each user of the terminal 102 can quickly obtain effective information. Among them, the terminal 102 can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart TV, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0048] In one embodiment, as shown in Figure 2 , a label processing method is provided. The method is applied to the server in Figure 1 for example, including the following steps:
[0049] Step S202, from the media data containing the text, respectively extracting the text features of the text and the label features of each candidate label contained in the text.
[0050] Among them, the media data containing the text can include at least two types of text, and the text features include at least two text features corresponding to the at least two types of text. Specifically, the media data can include title text and content text, and the text features include title text features corresponding to the title text and content text features corresponding to the content text.
[0051] Similarly, the candidate labels are determined from the text included in the media data, and when the text included in the media data is title text and content text, the candidate labels specifically include labels identified from the title text and labels identified from the content text.
[0052] For example, the media data can specifically be news data, and the text can specifically be news title text and news body text, and the candidate labels can be identified from the news title and the news body. Similarly, the media data can also be other types of data, such as page sharing data of a communication application platform and a social sharing platform, i.e., data containing title content and body content and capable of label processing and label display, which can all be determined as media data to be processed.
[0053] Specifically, by obtaining the media data to be processed, the title text and the content text of the media data to be processed are identified, and the title text features of the title text and the content text features of the content text are further extracted. When extracting the label features, the title text and the content text are respectively identified to obtain the labels in the title text and the labels in the content text, and the labels in the title text and the labels in the content text are all taken as candidate labels, and the label features of each candidate label are further extracted.
[0054] When the title text and the content text are respectively identified, entity mining and concept label generation based on the title text and the content text can be used to obtain the labels of the title text and the content text.
[0055] In an embodiment, the title text features of the title text and the content text features of the content text are further extracted from the title text and the content text of the media data to be processed by using a trained label fusion model. Similarly, the label features of the candidate labels identified from the title text and the content text of the media data are extracted by using the trained label fusion model. Further, when the title text features, the content text features, and the label features are extracted by using the trained label fusion model, the text feature extraction layer in the label fusion model is used for feature extraction.
[0056] The text feature extraction layer in the label fusion model can be a bert (Bidirectional Encoder Representations from Transformers) network, a fast-text network, and a text-cnn network (a network for classifying text using a convolutional neural network), and the like, as long as the network can realize the function of text feature extraction.
[0057] In one embodiment, the text includes at least two types of text, and the text features include at least two text features corresponding to the at least two types of text. After extracting the text features of the text from the media data containing the text, respectively, the method further includes:
[0058] determining the text feature similarity between the at least two text features; and updating the at least two text features based on the text feature similarity to obtain a text feature combination including the updated at least two text features.
[0059] Specifically, since the media data specifically includes title text and content text, the text features include title text features corresponding to the title text and content text features corresponding to the content text, and the text feature combination specifically includes the title text features and the content text features. Specifically, the text feature similarity between the title text features and the content text features is determined, and the title text features and the content text features are updated based on the text feature similarity between the title text features and the content text features to obtain updated title text features and updated content text features, and then the text feature combination including the updated title text features and the updated content text features can be obtained.
[0060] In this embodiment, the title text features and the content text features are updated by using the first feature update layer in the trained label fusion model. Specifically, the first feature update layer in the label fusion model can be a transformer network using self-attention, which updates the title text features and the content text features.
[0061] In one embodiment, the title text features and the content text features are updated based on the text feature similarity between the title text features and the content text features to obtain updated title text features and updated content text features, including:
[0062] determine a text feature similarity between the title text feature and the content text feature; determine a first feature weight matched by the title text feature and a second feature weight matched by the content text feature based on the text feature similarity; perform feature updating on the title text feature according to the first feature weight to obtain an updated title text feature, and perform feature updating on the content text feature according to the second feature weight to obtain an updated content text feature.
[0063] Specifically, the text feature similarity between the title text feature and the content text feature is calculated by using a first feature updating layer in the trained label fusion model, i.e., a transformer network using self-attention, and the first feature weight for feature updating of the title text feature and the second feature weight for feature updating of the content text feature are determined according to the text feature similarity.
[0064] Further, after the first feature weight matched by the title text feature and the second feature weight matched by the content text feature are determined by using the transformer network using self-attention, the title text feature is further updated according to the first feature weight to obtain an updated title text feature, and the content text feature is updated according to the second feature weight to obtain an updated content text feature.
[0065] Wherein, when the title text feature is updated according to the first feature weight, the product between the first feature weight and the title feature vector corresponding to the title text feature is calculated to obtain the updated title text feature, and similarly, when the content text feature is updated according to the second feature weight, the product between the second feature weight and the content text feature vector corresponding to the content text feature is calculated to obtain the updated content text feature.
[0066] Wherein, the following formula (1) is used to obtain the updated title text feature and the updated content text feature:
[0067] Emb_T title , Emb_T content =Transformer(Emb title , Emb content ); (1)
[0068] Wherein, Emb_T title represents the updated title text feature, Emb_T content represents the updated content text feature, Emb title represents the title text feature, Emb content represents the content text feature, Transformer(Emb title , Emb content) represents that the title text features and the content text features are processed by using a transformer network with self-attention to realize self-attention interaction of each feature, so as to obtain updated title text features and updated content text features.
[0069] In step S204, the feature of each label feature is updated based on the first feature similarity between the label features, to obtain the initial updated label features.
[0070] Specifically, for each target label feature to be updated in the label features, the first feature similarity between the target label feature and each of the remaining label features is fused to obtain a third feature weight matched with each target label feature, and the target label feature is updated based on the third feature weight matched with the target label feature to obtain the initial updated label features.
[0071] In the label features, a plurality of target label features need to be updated, and the first feature similarity between each target label feature and each of the remaining label features is calculated, and the plurality of first feature similarities corresponding to each target label feature are fused to obtain a third feature weight matched with each target label feature.
[0072] Further, in the embodiment, the second feature update layer in the trained label fusion model is used, that is, a transformer network with self-attention is used to calculate the first feature similarity between each target label feature and each of the remaining label features. The transformer network with self-attention represented by the second feature update layer has the same network structure as the transformer network with self-attention represented by the first feature update layer, but has different network parameters.
[0073] Similarly, after calculating the first feature similarity by using the transformer network with self-attention, the transformer network with self-attention is used to average the plurality of first feature similarities corresponding to each target label feature to achieve data fusion, and then obtain a third feature weight matched with each target label feature after the averaging processing, and then update each target label feature based on the third feature weight matched with each target label feature to obtain the initial updated label features.
[0074] In the third feature weight, the target label feature is updated by calculating the product between the third feature weight and the target label feature vector corresponding to the target label feature to obtain the initial updated label features.
[0075] wherein the following formula (2) is specifically used to obtain the initial updated label features:
[0076] Emb_T tag1 , Emb_T tagn , Emb_T tag1 , Emb_T tagn) ; (2) tag1 tagn tag1 tagn tag1 tagn
[0077] wherein Emb tag1 to Emb tagn represent n target label features to be updated, Emb_T tag1 to Emb_T tagn represent n initial updated label features after feature updating, and Transformer(Emb tag1 , Emb tagn ) represents that the transformer network using self-attention is used to perform self-attention interaction processing on each of the n target label features to be updated, so as to realize feature updating of the target label features and obtain the n initial updated label features.
[0078] In step S206, the initial updated label features are secondarily updated according to the co-occurrence relationship of each candidate label in the historical media data to obtain secondarily updated label features.
[0079] Specifically, data analysis and statistics are performed based on the historical media data including multiple labels to determine the co-occurrence relationship of each label in the historical media data. Further, each candidate label is combined in pairs to obtain multiple candidate label groups, and the co-occurrence relationship of two candidate labels in each candidate label group in the historical media data is further determined according to the co-occurrence relationship of each label in the historical media data. Then, the initial updated label features are secondarily updated according to the co-occurrence relationship of each candidate label in the historical media data to obtain secondarily updated label features.
[0080] In an embodiment, the co-occurrence relationship of two candidate labels in a candidate label group in the historical media data is specifically determined according to the co-occurrence probability between the two candidate labels included in the candidate label group. For example, if candidate label A and candidate label B are included in a candidate label group and both of them co-occur in multiple sub-media data of the historical media data, it indicates that the co-occurrence probability of candidate label A and candidate label B is high, and the co-occurrence relationship between the two can be further determined according to the co-occurrence probability. The co-occurrence probability between candidate label A and candidate label B is determined according to the co-occurrence times of candidate label A and candidate label B and the greater occurrence times of candidate label A and candidate label B.
[0081] The co-occurrence probability between the candidate label A and the candidate label B is determined by using the following formula (3):
[0082]
[0083] Corr_prob(A, B) represents the co-occurrence probability between the candidate label A and the candidate label B, #Corr_hum(A, B) represents the co-occurrence times of the candidate label A and the candidate label B, and max(#A, #B) represents the larger occurrence times of the candidate label A and the candidate label B, which can be the occurrence times of the candidate label A or the occurrence times of the candidate label B.
[0084] For example, three candidate labels A, B and C appear in the sub-media data Item1 in the historical media data, four candidate labels A, C, D and E appear in the sub-media data Item2, and two candidate labels A and F appear in the sub-media data Item3. The co-occurrence probability between the two candidate labels A and C is represented by Corr_prob(A, C).
[0085] The number of Items in which the candidate labels A and C co-occur is 2, that is, A and C co-occur in Item1 and Item2. The number of occurrences of the candidate label A is 3, that is, the candidate label A appears in the three sub-media data. The number of occurrences of the candidate label C is 2, that is, the candidate label C appears in Item1 and Item2. The co-occurrence times of the candidate label A and the candidate label C is 2, and the candidate label A appears 3 times, that is, the occurrence times of the candidate label A is greater than the occurrence times of the candidate label C. Therefore,
[0086] Similarly, for other multiple candidate label groups, it is also necessary to determine the co-occurrence probability between the two candidate labels included in each candidate label group. After determining the co-occurrence probability between the two candidate labels in each candidate label group, the co-occurrence relationship between the two candidate labels in each candidate label group is further determined according to the co-occurrence probability between the two candidate labels in each candidate label group.
[0087] In one embodiment, the initial updated label feature is updated again according to the co-occurrence relationship of the candidate labels in the historical media data by using the trained label fusion model to obtain a second updated label feature. When the initial updated label feature is updated again, the initial updated label feature is updated again according to the graph network feature update layer of the trained label fusion model to obtain the second updated label feature.
[0088] The graph network feature updating layer of the label fusion model can be a GAT network (Graph Attention Networks) or a GCN network (Graph Convolutional Network), i.e., a network that can implement graph-based feature extraction and updating, and can be used as the graph network feature updating layer of the label fusion model.
[0089] Further, based on the graph network feature updating layer of the label fusion model, the following formula (4) is used to obtain the second updated label features:
[0090] Emb_G tag1 , Emb_G tagn Emb_G tag1 , Emb_G tagn ); (4)
[0091] wherein Emb_T tag1 to Emb_T tagn represent the n first updated label features after feature updating, Emb_G tag1 to Emb_G tagn represent the second updated label features after the second updating, and GAT(Emb_T tag1 , Emb_T tagn ) represents the graph network feature updating layer represented by the GAT network, which is used to perform relevance interaction on each first updated label to realize the second updating of the first updated label features and obtain n second updated label features.
[0092] In step S208, based on the second feature similarity between each second updated label feature and the text feature, the target label in each candidate label that satisfies the similarity condition is determined as the label of the media data.
[0093] Since the text includes at least two types of text, and the text features include at least two text features corresponding to the at least two types of text, when calculating the second feature similarity between each second updated label feature and the text feature, the second feature similarity between each second updated label feature and the text feature combination is calculated.
[0094] Specifically, since the text feature combination can include multiple text features, and further for each of the secondary update label features, the sub-similarities between each of the secondary update label features and each of the text features in the text feature combination need to be determined, and the sub-similarities corresponding to the same secondary update label feature are data fused, and the result of the data fusion is determined as the second feature similarity between the secondary update label feature and the text feature combination.
[0095] In an embodiment, since the media data can specifically include title text and content text, the text feature specifically includes title text features of the title text and content text features of the content text, and further in calculating the second feature similarity between the secondary update label feature and the text feature combination, specifically for each of the secondary update label features, the first sub-similarity between the secondary update label feature and the updated title text feature and the second sub-similarity between the secondary update label feature and the updated content text feature are data fused to obtain the second feature similarity matched by each of the secondary update label features.
[0096] Wherein, after determining the second feature similarity between each of the secondary update label features and the text feature, the target similarity satisfying the similarity condition is screened from each of the second feature similarities, and the target label corresponding to the target similarity is screened from each of the candidate labels, and each of the target labels is determined as the label of the media data.
[0097] Further, in data fusing the first sub-similarity and the second sub-similarity, specifically, the mean value of the first sub-similarity and the second sub-similarity can be calculated to obtain the second feature similarity matched by each of the secondary update label features. Wherein, the first sub-similarity and the second sub-similarity can be understood as the first cosine similarity between the secondary update label feature and the updated title text feature and the second cosine similarity between the secondary update label feature and the updated content text feature.
[0098] In an embodiment, the step of screening the target similarity satisfying the similarity condition from each of the second feature similarities specifically includes:
[0099] According to the preset similarity condition, a corresponding preset similarity threshold is determined, and the target similarity greater than the preset similarity threshold is screened from each of the second feature similarities; or each of the second feature similarities is sorted according to the similarity value to obtain a corresponding feature similarity sequence, and according to the preset similarity condition, the first preset target similarity is screened from the feature similarity sequence.
[0100] Specifically, the similarity condition can be specifically setting a corresponding preset similarity threshold, to filter out a target similarity greater than the preset similarity threshold, and the similarity condition can also be specifically filtering out a preset number of target similarities in the feature similarity sequence, such as filtering out the first M target similarities. Wherein M is an integer that can be adjusted and set to different values according to actual needs or actual application scenarios, without specific limitation, and the feature similarity sequence is arranged in descending order of similarity value.
[0101] In one embodiment, specifically through the trained label fusion model, the second feature similarity between each secondary updated label feature and the text feature is determined, and the target label whose second feature similarity satisfies the similarity condition is filtered out based on each candidate label, so as to determine the target label as the label of the media data. Wherein, when filtering out the target label, the label fusion filtering layer of the trained label fusion model is used to filter out the target label whose second feature similarity satisfies the similarity condition based on each candidate label, so as to determine the target label as the label of the media data.
[0102] In one embodiment, after determining the label of the media data, the label of the media data is further added to the recommendation model as a content-side feature to improve the effect of personalized recommendation, and the label of the media data can also be made explicit on the application platform to which the media data belongs, and the click operation of the using object on each explicit label is detected to extract the interest point of the using object, predict the interest or hobby tendency of the using object, so as to perform personalized recommendation, so that the using object clicks, accesses or purchases the product or business associated with the corresponding media data as much as possible, and further improve the revenue of the application platform.
[0103] In the above label processing method, the text feature of the text and the label feature of each candidate label contained in the text are respectively extracted from the media data containing the text, so that each label feature is updated based on the first feature similarity between the label features to obtain the initial updated label feature, thereby improving the correlation between the obtained initial updated label features. The initial updated label feature is updated again according to the co-occurrence relationship of each candidate label in the historical media data to obtain the secondary updated label feature, so as to further improve the correlation between the obtained secondary updated label features. Finally, each secondary updated label feature and the text feature are determined based on the second feature similarity between the secondary updated label feature and the text feature, and the target label whose second feature similarity satisfies the similarity condition is determined as the label of the media data, thereby improving the correlation between the determined label of the media data and the media data, avoiding the situation that the using object cannot accurately obtain effective information due to low label correlation, and further improving the personalized recommendation effect when recommending each using object based on the media data.
[0104] In one embodiment, as shown, the step of performing secondary update on the initially updated label feature to obtain the secondary updated label feature, i.e. the step of performing secondary update on the initially updated label feature to obtain the secondary updated label feature according to the co-occurrence relationship of each candidate label in the historical media data, specifically comprises: Figure 3
[0105] Step S302, constructing a label co-occurrence relationship graph according to the co-occurrence relationship between each candidate label in the historical media data.
[0106] Specifically, by combining each candidate label in pairs to obtain a plurality of candidate label groups, and determining the co-occurrence relationship between two candidate labels in each candidate label group, specifically, by obtaining the co-occurrence times of two candidate labels in each candidate label group in the historical media data, and determining the co-occurrence probability of the candidate labels in the candidate label group according to the co-occurrence times, and further determining the co-occurrence relationship between the two candidate labels in the candidate label group according to the co-occurrence probability of the candidate labels in the candidate label group and the preset probability condition.
[0107] Wherein, the co-occurrence relationship between the two candidate labels in the candidate label group determined according to the co-occurrence probability of the candidate labels in the candidate label group and the preset probability condition, and for the label co-occurrence relationship graph, the connection relationship between the nodes in the graph can be understood as the co-occurrence relationship between the two candidate labels in the candidate label group, that is, after determining the co-occurrence relationship between the two candidate labels in the candidate label group, it can be understood as determining each node in the label co-occurrence relationship graph and the connection relationship between the nodes.
[0108] Further, after determining the co-occurrence relationship between the two candidate labels in the candidate label group, i.e. determining each node in the label co-occurrence relationship graph and the connection relationship between the nodes, further constructing the label co-occurrence relationship graph according to the nodes and the connection relationship between the nodes.
[0109] Step S304, for each candidate label in the label co-occurrence relationship graph, obtaining the connection candidate label having a connection relationship with the candidate label in the label co-occurrence relationship graph, and determining the third feature similarity between the label feature of the connection candidate label and the label feature of the candidate label.
[0110] Specifically, for each candidate label in the label co-occurrence relationship graph, according to the connection relationship between the nodes in the label co-occurrence relationship graph, the connection candidate label having a connection relationship with the candidate label can be obtained, wherein for each candidate label, according to the different connection relationship between the nodes, the connection candidate label having a connection relationship with each candidate label obtained is also different.
[0111] Further, after obtaining the connection candidate label having the connection relationship with the candidate label, a third feature similarity between the label feature of the connection candidate label and the label feature of the candidate label is calculated according to the label feature of the candidate label and the label feature of the connection candidate label. Since there can be multiple connection candidate labels having the connection relationship with one candidate label, the calculated third feature similarity can also be one or more.
[0112] In step S306, a fourth feature weight matched by the initial update label feature of the candidate label is determined according to the third feature similarity matched by the candidate label.
[0113] Specifically, when there are multiple candidate connection labels having the connection relationship with one candidate label, there are also multiple third feature similarities matched by the candidate connection labels, and then the multiple third feature similarities between the label feature of the connection candidate label and the label feature of the candidate label are further averaged to achieve data fusion, and the average value of the third feature similarity after the averaging is obtained and determined as the fourth feature weight matched by the initial update label feature of the candidate label.
[0114] Further, in this embodiment, the third feature similarity between the label feature of the connection candidate label and the label feature of the candidate label is calculated based on the label feature of the candidate label and the label feature of the connection candidate label according to the graph network feature update layer of the trained label fusion model, and the third feature similarity between the label feature of the connection candidate label and the label feature of the candidate label is further averaged to obtain the average value of the third feature similarity after the averaging, and the average value of the third feature similarity is determined as the fourth feature weight matched by the initial update label feature of the candidate label.
[0115] In step S308, the initial update label feature of the candidate label is updated twice based on the fourth feature weight matched by the initial update label feature to obtain a second update label feature.
[0116] Specifically, after the fourth feature weight matched by the initial update label feature is determined according to the graph network feature update layer of the trained label fusion model, the initial update label feature is further updated twice according to the fourth feature weight to obtain the second update label feature.
[0117] Specifically, since the graph network feature update layer can be a GAT network, in this embodiment, the fourth feature weight matched by the initial update label feature is determined based on the GAT network, and the initial update label feature is updated twice according to the fourth feature weight to obtain the second update label feature.
[0118] According to the fourth feature weight, the initial update label feature is updated again, specifically, the product of the fourth feature weight and the initial update label feature vector corresponding to the initial update label is calculated to obtain the secondary update label feature.
[0119] In this embodiment, according to the co-occurrence relationship between each candidate label in the historical media data, a label co-occurrence relationship graph is constructed, and for each candidate label in the label co-occurrence relationship graph, a connected candidate label having a connection relationship with the candidate label in the label co-occurrence relationship graph is obtained, and a third feature similarity between the label feature of the connected candidate label and the label feature of the candidate label is determined. Further, according to the third feature similarity matched by the candidate label, the fourth feature weight matched by the initial update label feature of the candidate label is determined, so as to update the initial update label feature of the candidate label based on the fourth feature weight matched by the initial update label feature, and obtain the secondary update label feature. Based on the co-occurrence relationship graph, the connected candidate label having the connection relationship with the candidate label is determined, and the third feature similarity between the candidate label and the connected candidate label is calculated, so as to update the initial update label feature based on the fourth feature weight determined according to the third feature similarity, so as to further improve the correlation between the obtained secondary update label features, so as to improve the correlation between the determined label of the media data and the media data when the label of the media data is screened subsequently, and avoid the situation that the object cannot accurately obtain effective information due to low label correlation.
[0120] In one embodiment, as shown in Figure 4 According to the co-occurrence relationship between each candidate label in the historical media data, the step of constructing a label co-occurrence relationship graph specifically includes:
[0121] Step S402, each candidate label is combined two by two to obtain a plurality of candidate label groups.
[0122] Specifically, after the title text feature corresponding to the title text and the content text feature of the content text are extracted from the media data containing the text, the title text and the content text are further labeled respectively to obtain the label in the title text and the label in the content text, and the label in the title text and the label in the content text are taken as candidate labels.
[0123] Further, by combining each candidate label two by two, a plurality of candidate label groups are obtained, for example, there are 4 candidate labels, including A label, B label, C label and D label, and by combining the 4 candidate labels two by two, candidate label groups AB, AC, AD, BC, BD and CD are obtained.
[0124] Step S404, obtaining the co-occurrence times of the two candidate labels in each candidate label group in the historical media data.
[0125] Specifically, by performing data analysis and statistics based on the historical media data including multiple labels, the co-occurrence times of each label in the historical media data are determined, so that based on the co-occurrence relationship of each label in the historical media data, the co-occurrence times of the two candidate labels in each candidate label group in the historical media data can be determined.
[0126] Step S406, determining the co-occurrence probability of the candidate labels in the candidate label group according to the co-occurrence times.
[0127] Specifically, according to the co-occurrence times of the two candidate labels in each candidate label group in the historical media data, and the respective occurrence times of the two candidate labels in each candidate label group in the historical media data, the co-occurrence probability of the candidate labels in the candidate label group is calculated.
[0128] The co-occurrence probability of the two candidate labels in the candidate label group, such as the co-occurrence probability of candidate label A and label B in the candidate label group, is specifically determined according to the co-occurrence times of candidate label A and candidate label B, and the greater occurrence times of candidate label A and candidate label B.
[0129] For example, if the occurrence times of candidate label A in the historical media data are greater, the co-occurrence probability of candidate label A and label B is specifically calculated according to the co-occurrence times of candidate label A and candidate label B, and the occurrence times of candidate label A.
[0130] Similarly, if the occurrence times of candidate label B in the historical media data are greater, the co-occurrence probability of candidate label A and label B is specifically calculated according to the co-occurrence times of candidate label A and candidate label B, and the occurrence times of candidate label B.
[0131] Step S408, performing deduplication processing on the candidate labels contained in the target label group with co-occurrence probability meeting the probability condition in the candidate label group, determining the candidate labels obtained after the deduplication processing as nodes of the label co-occurrence relationship graph, and determining the connection relationship between the nodes based on the target label group.
[0132] Specifically, according to the preset probability condition, the co-occurrence probability between the two candidate labels in each candidate label group is screened, the target label group with co-occurrence probability meeting the probability condition is screened, and the candidate labels contained in the target label group are deduplicated to obtain the candidate labels obtained after the deduplication processing, so as to determine the candidate labels obtained after the deduplication processing as nodes of the label co-occurrence relationship graph.
[0133] Furthermore, based on the target label group that meets the probability conditions, and the candidate labels obtained after deduplication (i.e., the nodes in the label co-occurrence relationship graph), the connection relationships between nodes are determined. The probability conditions can be set and adjusted according to actual needs and are not limited to specific values. For example, the probability condition can be set to a co-occurrence probability greater than 0, meaning the co-occurrence probability between two candidate labels in the target label group is greater than 0.
[0134] It is understandable that, since the co-occurrence probability between two candidate tags in the target tag group is greater than 0, and each node in the tag co-occurrence relationship graph is obtained by deduplicating the candidate tags contained in the target tag group, the connection relationship between each node in the tag co-occurrence relationship graph can also be determined based on the target tag group that meets the probability conditions. That is, two candidate tags with a co-occurrence probability greater than 0 need to be connected, while two candidate tags with a co-occurrence probability less than or equal to 0 do not need to be connected.
[0135] Step S410: Construct a label co-occurrence relationship graph based on the nodes and the connection relationships between them.
[0136] Specifically, by deduplicating the candidate tags contained in the target tag group, the deduplicated candidate tags are obtained, and the deduplicated candidate tags are determined as nodes in the tag co-occurrence relationship graph. Based on each target tag group, the connection relationship between each node can be determined, and then based on each node and the connection relationship between nodes, a tag sharing relationship graph can be constructed.
[0137] In one embodiment, such as Figure 5 As shown, an initial co-occurrence relationship graph is provided based on each candidate label and the co-occurrence probability among them. (Refer to...) Figure 5 For example, if there are 5 candidate labels, including candidate labels 0.3, B, C, D, D and E, and the candidate label groups are AB, BD, BC, EC and ED, the co-occurrence probability between two candidate labels in the candidate label group is calculated. Specifically, the co-occurrence probability between A and B in candidate label group AB is 0.6, the co-occurrence probability between B and C in candidate label group BC is 0, the co-occurrence probability between B and D in candidate label group BD is 0.4, the co-occurrence probability between E and C in candidate label group EC is 0.3, and the co-occurrence probability between E and D in candidate label group ED is 0.8.
[0138] Furthermore, based on the co-occurrence probability between two subsequent labels in each candidate label group, and the corresponding candidate label groups, a system is constructed as follows: Figure 5 The initial co-occurrence relationship diagram is shown.
[0139] In one embodiment, such as Figure 6As shown, a label co-occurrence relationship graph obtained after screening based on a probability condition is provided, for reference Figure 6 It can be seen that, since each candidate label group needs to be further screened according to a preset probability condition, such as setting the probability condition as the co-occurrence probability being greater than 0, each candidate label group including AB, BD, BC, EC and ED is screened according to the probability condition, and a target label group is obtained, that is, a target label group in which the co-occurrence probability between the included candidate labels is greater than 0, including target label groups AB, BD, EC and ED.
[0140] Further, according to the target label groups AB, BD, EC and ED, the connection relationship between each candidate label A, B, C, D and E is determined, and the edge weight between two candidate labels having a connection relationship is set to 1, to obtain a label co-occurrence relationship graph as shown in Figure 6 .
[0141] In this embodiment, by combining each candidate label in pairs, a plurality of candidate label groups are obtained, and the co-occurrence times of two candidate labels in each candidate label group in historical media data are obtained, and then the co-occurrence probability of the candidate labels in the candidate label group is determined according to the co-occurrence times. Further, by performing deduplication processing on the candidate labels included in the target label group whose co-occurrence probability meets the probability condition, the candidate labels obtained after deduplication processing are determined as nodes of the label co-occurrence relationship graph, and the connection relationship between the nodes is determined based on the target label group, so as to construct the label co-occurrence relationship graph based on the nodes and the connection relationship between the nodes. According to the co-occurrence probability between each candidate label and the preset probability condition, each node used to construct the label co-occurrence relationship graph and the target label group used to determine the connection relationship between each node are screened, so as to improve the correlation degree between each candidate label, and then based on the label co-occurrence relationship graph, the initial update feature of the candidate label is further updated, thereby improving the correlation degree between the obtained secondary update label features, and further improving the correlation degree between the determined media data labels and media data.
[0142] In one embodiment, as shown in Figure 7 , a training process of a label fusion model is provided, specifically including the following steps:
[0143] Step S702, obtaining each media data sample pre-labeled.
[0144] Specifically, to train the original label fusion model, each media data sample pre-labeled needs to be obtained, and each media data sample is taken as a training sample set to train the original label fusion model, so as to obtain the trained label fusion model.
[0145] The media data sample can be a news data sample, or other types of data, such as page sharing data from communication application platforms and social sharing platforms. This includes data containing title content and body content, and data that can be tagged and displayed. All of these can be pre-labeled to obtain the media data sample.
[0146] Furthermore, pre-labeling means that the original label relevance between each candidate label and text feature in each media data sample is pre-calculated based on each media data sample, and the original label relevance is added to the corresponding media data sample.
[0147] Step S704: Extract the sample text features of the text and the sample label features of each candidate label contained in the text from each media data sample containing text.
[0148] Specifically, media data samples can include title text and content text. Sample text features include sample title text features corresponding to the title text and sample content text features corresponding to the content text. Candidate tags are determined from the text included in the media data. When the media data includes title text and content text, candidate tags specifically include tags obtained from tag recognition of the title text and tags obtained from tag recognition of the content text. Further feature extraction from the tags in the title text and the tags in the content text yields the sample tag features for each candidate tag.
[0149] Specifically, the text feature extraction layer of the original label model is used to extract sample title text features, sample content text features, and sample label features, thereby obtaining the sample title text features, sample content text features, and sample label features for each candidate label contained in the text.
[0150] In one embodiment, after obtaining the sample title text features and sample content text features, the method further includes:
[0151] Determine the text feature similarity between the sample title text features and the sample content text features; based on the text feature similarity, determine the first feature weight matched by the sample title text features and the second feature weight matched by the sample content text features; update the sample title text features according to the first feature weight to obtain the updated sample title text features, and update the sample content text features according to the second feature weight to obtain the updated sample content text features.
[0152] Specifically, the text feature similarity between the sample title text feature and the sample content text feature is calculated by using a first feature updating layer in the original label fusion model, i.e., a transformer network using self-attention, and based on the text feature similarity, a first feature weight for updating the sample title text feature and a second feature weight for updating the sample content text feature are determined, and the sample title text feature is further updated according to the first feature weight to obtain an updated sample title text feature, and the sample content text feature is further updated according to the second feature weight to obtain an updated sample content text feature.
[0153] In step S706, each sample label feature is updated based on the first feature similarity between the sample label features to obtain a first updated sample label feature.
[0154] Specifically, for each target sample label feature to be updated in the sample label features, the first feature similarity between the target sample label feature and each of the remaining sample label features is fused to obtain a third feature weight matched to each target sample label feature, and the target sample label feature is updated based on the third feature weight matched to the target sample label feature to obtain a first updated sample label feature.
[0155] Further, the first feature similarity between each target sample label feature and each of the remaining sample label features is calculated by using a second feature updating layer in the original label fusion model, i.e., a transformer network using self-attention, and the third feature weight matched to each target sample label feature is obtained by averaging the first feature similarities corresponding to the target sample label feature using the transformer network using self-attention, and each target sample label feature is updated based on the third feature weight matched to the target sample label feature to obtain a first updated sample label feature.
[0156] The transformer network using self-attention represented by the second feature updating layer has the same network structure as the transformer network using self-attention represented by the first feature updating layer, but has different network parameters.
[0157] In step S708, the first updated sample label feature is updated according to the co-occurrence relationship of each candidate label in the historical media data to obtain a second updated sample label feature.
[0158] Specifically, according to the co-occurrence relationship between each candidate label in the historical media data, a label co-occurrence relationship graph is constructed, and for each candidate label in the label co-occurrence relationship graph, a connected candidate label having a connection relationship with the candidate label in the label co-occurrence relationship graph is obtained, and a third feature similarity between a sample label feature of the connected candidate label and a sample label feature of the candidate label is further determined. Further, according to the third feature similarity matched by the candidate label, a fourth feature weight matched by the primary updated sample label feature of the candidate label is determined, so as to update the primary updated sample label feature of the candidate label based on the fourth feature weight matched by the primary updated sample label feature, to obtain a secondary updated sample label feature.
[0159] Specifically, after determining the fourth feature weight matched by the primary updated sample label feature through the graph network feature updating layer of the original label model, the primary updated sample label feature is further updated according to the fourth feature weight to obtain the secondary updated sample label feature.
[0160] Step S710, determine the second feature similarity between each secondary updated sample label feature and the sample text feature.
[0161] Specifically, the media data sample can specifically include title text and content text, and the sample text feature specifically includes a sample title text feature of the title text and a sample content text feature of the content text. Specifically, for each secondary updated sample label feature, the first sub-similarity between the secondary updated sample label feature and the updated sample title text feature and the second sub-similarity between the secondary updated sample label feature and the updated sample content text feature are data fused to obtain the second feature similarity matched by each secondary updated sample label feature.
[0162] Step S712, determine the prediction loss value corresponding to each second feature similarity.
[0163] Specifically, in the training process of the original label fusion model, the output result, i.e., the second feature similarity, predicted by the model needs to be calculated for loss value to obtain the prediction loss value corresponding to the second feature similarity. The prediction loss value is used to determine whether the current model reaches the model convergence condition. When it is determined according to the prediction loss value that the model convergence condition is reached, the training of the original label fusion model is completed, and the trained label fusion model is obtained.
[0164] In one embodiment, since the underlying model for obtaining the tags of the media data is frequently updated in version, the same media data, different versions of the underlying model output different tag sets, but when labeling the tags, the labeled tag set may be set A output by the underlying model version 1, but assuming that the underlying model version is updated to version 2, the tag set is updated to set B, and there is a difference set between set A and set B. When training the original tag fusion model, the latest set B is usually needed to train the network, but the newly added labels in set B are not in set A, so these newly added labels are not pre-labeled, and therefore do not carry the original tag relevance.
[0165] If the newly added labels in set B but not in set A are directly deleted during model training, the contribution of the deleted newly added labels to the current sample label features will be lost when the feature is updated. Further, two different prediction loss value calculation methods are provided for the presence or absence of newly added labels to solve the problem that the prediction loss value has errors due to the newly added labels not carrying the original label relevance.
[0166] Specifically, for the case where no newly added label is detected, the original label relevance pre-labeled based on each candidate label is obtained, and the prediction loss value is determined according to each second feature similarity and each original label relevance.
[0167] Specifically, the prediction loss value MSEloss is determined by the following formula (5):
[0168] MSEloss = (mean_score - label) 2 ; (5)
[0169] Wherein, MSEloss represents the prediction loss value, mean_score represents the second feature similarity, and label represents the original label relevance pre-labeled by the candidate label.
[0170] Further, in the case where the newly added label is detected and the newly added label does not carry the corresponding original label relevance, a preset fixed value is determined as the prediction loss value corresponding to each newly added label.
[0171] It can be understood that, in order to solve the problem of newly added labels not carrying original label relevance, when calculating the prediction loss value MSEloss, for the newly added labels not carrying the original label relevance, a preset fixed value is determined as the prediction loss value corresponding to each newly added label.
[0172] Specifically, the preset fixed value can be 0, that is, for the new label not carrying the original label relevance, the prediction loss value NSEloss is not calculated, and the prediction loss value MSEliss is 0, so as to reserve the complete B set and avoid the deletion of the new label, and the specific value of the prediction loss value will not be disturbed by the new label not carrying the original label relevance when calculating the prediction loss value, thereby reducing the calculation error and ensuring the calculation accuracy of the prediction loss value.
[0173] In step S714, if the prediction loss value reaches the model convergence condition, the training of the original label fusion model is completed, and a trained label fusion model is obtained.
[0174] Specifically, the loss value threshold corresponding to the model convergence condition is obtained, and the prediction loss value and the loss value threshold are compared to determine whether the prediction loss value is less than the corresponding loss value threshold. When the prediction loss value is less than the loss value threshold, it indicates that the prediction loss value reaches the model convergence condition, the training of the original label fusion model is completed, and a trained label fusion model is obtained. Otherwise, when the prediction loss value is greater than or equal to the loss value threshold, it indicates that the prediction loss value does not reach the model convergence condition, and the model needs to be further trained.
[0175] In one embodiment, based on the pre-labeled evaluation data set, the effects of the label fusion models trained by setting different training strategies are evaluated in terms of accuracy and recall rate, which are specifically illustrated by the following Table 1 (i.e., the model effect comparison table based on different training strategies):
[0176] Table 1 Model effect comparison table based on different training strategies
[0177]
[0178] Among them, referring to Table 1, “both content side and label side only use the original feature vector obtained by the bert network” indicates that the content side does not use the transformer network to obtain the feature vector, and only uses the original feature vector (i.e. Embtitle and Embcontent) obtained by the bert network. The label side also does not use the transformer network and the GAT network, and only uses the original feature vector (i.e. Embtag) obtained by the bert network; “only the content side increases the transformer network” indicates that the content side uses the feature vector (i.e. Emb_Ttitle and Emb_Tcontent) obtained by the transformer network, while the label side still only uses the original feature vector (i.e. Embtag) obtained by the bert network; “only the label side increases the transformer network” indicates that the content side still only uses the original feature vector of the bert network (i.e. Embtitle and Embcontent), while the label uses the feature vector (i.e. Emb_Ttag) obtained by the transformer network; “the content side and the label side simultaneously increase the transformer network” indicates that the content side and the label side both use the feature vector (i.e. Emb_Ttitle, Emb_Tcontent and Emb_Ttag) obtained by the transformer network; “the content side and the label side simultaneously increase the transformer, and the label side increases the GAT network” indicates that the content side uses the feature vector (i.e. Emb_Ttitle and Emb_Tcontent) obtained by the transformer network, while the label side uses the feature vector (i.e. Emb_Gtag) obtained by processing the transformer network first and then processing the GAT network.
[0179] Further, by setting the accuracy to 85%, the recall rate effect and the average number of labels of the model under different training strategies are evaluated under the condition that the accuracy is 85%. Referring to Table 1, under the condition that “both the content side and the label side only use the original feature vector obtained by the bert network”, the model recall rate effect is the worst, and the average number of labels is the least. Through the training strategies introduced for the content side and the label side, such as increasing the transformer network processing or the GAT network processing, the model recall rate effect and the average number of labels of the model are gradually improved. It can be known that the more complete the added training strategies are, the more the average number of labels corresponding to the trained model is, and the larger the recall rate is, that is, the better the effect of the trained model is. Therefore, the labels of the media data screened by the trained model have a higher degree of association with the media data itself, which avoids the situation that the use object cannot accurately obtain effective information due to the low degree of association of the label, and further improves the personalized recommendation effect when recommending each use object based on the media data.
[0180] In this embodiment, by obtaining pre-labeled media data samples, sample text features of the text and sample label features of each candidate label contained in each media data sample are extracted, and then each sample label feature is updated based on the first feature similarity between the sample label features to obtain the first updated sample label feature. Further, the first updated sample label feature is updated again according to the co-occurrence relationship of each candidate label in historical media data to obtain the second updated sample label feature, and the second feature similarity between each second updated sample label feature and the sample text feature is determined. Wherein, in the case where no new label is detected, the original label relevance based on each candidate label is obtained, so as to determine the prediction loss value according to each second feature similarity and each original label relevance, and in the case where a new label is detected and the new label does not carry the corresponding original label relevance, a preset fixed value is determined as the prediction loss value corresponding to each new label. By setting different prediction loss value determination methods for different cases with or without new labels, the complete label set can be retained, and the deletion of new labels can be avoided. In addition, when calculating the prediction loss value, the specific value of the prediction loss value will not be disturbed by the new label without carrying the original label relevance, which reduces the calculation error and ensures the calculation accuracy of the prediction loss value. Further, when the prediction loss value reaches the model convergence condition, the training of the original label fusion model is completed, and the trained label fusion model is obtained, which improves the training efficiency of the model and reduces the resource consumption.
[0181] In one embodiment, as shown in Figure 8 , an architecture diagram of a label fusion model is provided, and the label processing method in the present embodiment is implemented by Figure 8 , that is, the label of the media data is determined by Figure 8 . As can be seen from Figure 8 , the label fusion model is a double-tower network structure, and the bottom layer has two towers as input, which are content side and label side. The content side is divided into title text (i.e. title) and content text (i.e. content) in the media data sample, and the label side is the label identification of the title text and the content text to obtain multiple candidate labels (i.e. tag1, … tag n ).
[0182] First, in the training process of the model, the title text and the content text in the media data sample, as well as the candidate label, are all in the form of text input, which can use the text feature extraction layer in the label fusion model, i.e. the Bert network, to extract the sample title text feature of the title text (i.e. Emb title), sample content text features (i.e. Emb content ), and extract respective sample label features (i.e. Emb tag1 , Emb tagn , Emb title ) of each candidate label.
[0183] Secondly, since both the title text and the content text come from the content side, the first feature updating layer of the label fusion model, i.e. the transformer network using self-attention, is used to perform self-attention interaction processing on the sample title text features and the sample content text features to realize respective feature updating, so as to obtain updated sample title text features (i.e. Emb_T title ) and updated sample content text features (i.e. Emb_T content ).
[0184] Specifically, the transformer network using self-attention is used to determine the first feature weight matched with the sample title text features and the second feature weight matched with the sample content text features, and further perform feature updating on the sample title text features according to the first feature weight to obtain updated sample title text features, and perform feature updating on the sample content text features according to the second feature weight to obtain updated sample content text features.
[0185] Similarly, for the sample label features of each candidate label, each sample label feature includes multiple target sample label features that need to be updated, and then the second feature updating layer in the label fusion model, i.e. the transformer network using self-attention, is used to calculate the first feature similarity between each target sample label feature and each of the remaining sample label features in each sample label feature. The transformer network using self-attention represented by the second feature updating layer has the same network structure as the transformer network using self-attention represented by the first feature updating layer, but has different network parameters.
[0186] Further, after calculating the first feature similarity by using the transformer network using self-attention, the transformer network using self-attention is used to average the multiple first feature similarities corresponding to the target sample label features to achieve data fusion, and then obtain the third feature weight matched with each target sample label feature after the averaging processing, so as to perform feature updating on each target sample label feature (i.e. Emb tag1 , Emb tagn ) based on the third feature weight matched with each target sample label feature, to obtain the first updated sample label features (i.e. Emb_T tag1, Emb_T tagn ).
[0187] Third, for the label feature of the first updated sample label after the label side feature update, the graph network feature update layer of the label fusion model is used, which can be specifically using GAT network, according to the co-occurrence relationship of each candidate label in the historical media data, the first updated sample label feature (i.e. Emb_T tag1 , Emb_T tagn ) is updated twice to obtain the second updated sample label feature (i.e. Emb_G tag1 , Emb_G tagn ).
[0188] Wherein, before using the graph network feature update layer of the label fusion model to update the first updated sample label feature twice, the label co-occurrence relationship graph needs to be constructed to obtain each candidate label in the label co-occurrence relationship graph and the connection candidate label with which the candidate label has a connection relationship, and determine the third feature similarity between the label feature of the connection candidate label and the label feature of the candidate label. Further, according to the third feature similarity matched by the candidate label, the fourth feature weight matched by the first updated label feature of the candidate label is determined. Wherein, the fourth feature weight matched by the first updated label feature is used to update the first updated label feature of the candidate label twice to obtain the second updated label feature.
[0189] Specifically, first, data analysis and statistics need to be performed based on the historical media data including multiple labels to determine the co-occurrence relationship of each label in the historical media data. Wherein, the co-occurrence relationship of each label in the historical media data is used to determine the co-occurrence times of each two candidate labels in the historical media data.
[0190] Further, by combining each candidate label in pairs, a plurality of candidate label groups are obtained, by obtaining the co-occurrence times of two candidate labels in each candidate label group in the historical media data, and further according to the co-occurrence times, the co-occurrence probability of the candidate labels in the candidate label group is determined. Wherein, the candidate labels contained in the target label group whose co-occurrence probability meets the probability condition in the candidate label group are processed by de-duplication, and the candidate labels obtained after de-duplication are determined as the nodes of the label co-occurrence relationship graph, and the connection relationship between the nodes is determined based on the target label group, so that the label co-occurrence relationship graph can be constructed based on the nodes and the connection relationship between the nodes. Fourth, for each second updated sample label feature (i.e. Emb_G tag1 , Emb_G tagn ), the first sub-similarity (i.e. score title ) between each second updated sample label feature and the updated sample title text feature (i.e. Emb-T title ) needs to be calculated respectively.tt ), and a second sub-similarity (i.e., score content ) between each second updated label feature and the updated sample content text feature (i.e., Emb_T ct ).
[0191] The first sub-similarity and the second sub-similarity are data fused, specifically, the data fusion between the first sub-similarity and the second sub-similarity can be achieved by calculating the mean value of the first sub-similarity and the second sub-similarity, to obtain the second feature similarity (i.e., mean_score) of each second updated label feature.
[0192] Fifth, in the case where no new label is detected, the predicted loss value (i.e., MSEloss1, MSEloss n ) corresponding to each candidate label is determined based on the original label relevance (i.e., label1,..., label n ) pre-labeled by each candidate label, and the second feature similarity (i.e., mean_score1,..., mean_score n ).
[0193] Wherein, in the case where the new label is detected and the new label does not carry the corresponding original label relevance, a preset fixed value is determined as the predicted loss value corresponding to each new label.
[0194] Sixth, by obtaining the loss value threshold corresponding to the model convergence condition, and comparing the predicted loss value with the loss value threshold, it is judged whether the predicted loss value is less than the corresponding loss value threshold. Wherein, when the predicted loss value is less than the loss value threshold, it indicates that the predicted loss value reaches the model convergence condition, the training of the original label fusion model is completed, and the trained label fusion model is obtained.
[0195] Further, by using the trained label fusion model, the media data containing text is processed to obtain the label of the media data. Specifically, by using the trained label fusion model, the text features of the text and the label features of each candidate label contained in the text are extracted from the media data containing text, respectively, and based on the first feature similarity between each label feature, each label feature is updated to obtain the first updated label feature. Further, according to the co-occurrence relationship of each candidate label in the historical media data, the first updated label feature is updated to obtain the second updated label feature, so as to determine the target label in the candidate label which satisfies the similarity condition based on the second feature similarity between each second updated label feature and the text feature as the label of the media data.
[0196] In the label processing method, the trained label processing model is used to extract text features of the text and label features of each candidate label contained in the text from the media data containing the text, respectively, to perform feature updating on each label feature based on first feature similarities between the label features, to obtain initially updated label features, and to improve the correlation between the obtained initially updated label features. The initially updated label features are updated again according to the co-occurrence relationship of each candidate label in historical media data to obtain secondly updated label features, so as to further improve the correlation between the obtained secondly updated label features. Finally, based on second feature similarities between each secondly updated label feature and the text features, a target label that satisfies a similarity condition in the second feature similarity among the candidate labels is determined as the label of the media data, thereby improving the correlation between the determined label of the media data and the media data, avoiding the situation that the use object cannot accurately obtain effective information due to low label correlation, and further improving the personalized recommendation effect when each use object is recommended based on the media data.
[0197] In one embodiment, as shown in Figure 9 A label processing method is provided, specifically comprising the following steps:
[0198] Step S901, identifying title text and content text of media data, and extracting title text features of the title text and content text features of the content text.
[0199] Step S902, performing label recognition on the title text and the content text respectively to obtain candidate labels, and extracting respective label features of each candidate label, the candidate labels including labels in the title text and labels in the content text.
[0200] Step S903, determining text feature similarity between the title text features and the content text features.
[0201] Step S904, determining a first feature weight matched with the title text features and a second feature weight matched with the content text features based on the text feature similarity.
[0202] Step S905, performing feature updating on the title text features according to the first feature weight to obtain updated title text features, and performing feature updating on the content text features according to the second feature weight to obtain updated content text features.
[0203] Step S906, for each target label feature to be updated in the label features, performing data fusion on the first feature similarity between the target label feature and each of the remaining label features in the label features to obtain a third feature weight matched with each target label feature.
[0204] In step S907, the target label feature is updated based on the third feature weight matched by the target label feature, to obtain a first updated label feature.
[0205] In step S908, each candidate label is combined two by two to obtain a plurality of candidate label groups, and the co-occurrence times of two candidate labels in each candidate label group in the historical media data are obtained.
[0206] In step S909, the co-occurrence probability of the candidate labels in the candidate label group is determined according to the co-occurrence times.
[0207] In step S910, the candidate labels contained in the target label group whose co-occurrence probability meets a probability condition are de-duplicated, the candidate labels obtained after the de-duplication are determined as nodes of a label co-occurrence relationship graph, and the connection relationship between the nodes is determined based on the target label group.
[0208] In step S911, the label co-occurrence relationship graph is constructed based on the nodes and the connection relationship between the nodes.
[0209] In step S912, for each candidate label in the label co-occurrence relationship graph, a connection candidate label having a connection relationship with the candidate label in the label co-occurrence relationship graph is obtained, and a third feature similarity between the label feature of the connection candidate label and the label feature of the candidate label is determined.
[0210] In step S913, the fourth feature weight matched by the first updated label feature of the candidate label is determined according to the third feature similarity matched by the candidate label.
[0211] In step S914, the first updated label feature of the candidate label is updated based on the fourth feature weight matched by the first updated label feature, to obtain a second updated label feature.
[0212] In step S915, each candidate label whose second feature similarity meets a similarity condition is determined as a label of the media data based on the second feature similarity between each second updated label feature and the text feature.
[0213] In the label processing method, the text features of the text and the label features of each candidate label contained in the text are extracted from the media data containing the text, respectively, to perform feature updating on each label feature based on a first feature similarity between the label features, to obtain initially updated label features, thereby improving the correlation between the obtained initially updated label features. The initially updated label features are further updated according to the co-occurrence relationship of each candidate label in historical media data to obtain secondly updated label features, thereby further improving the correlation between the obtained secondly updated label features. Finally, a target label that meets a similarity condition in the second feature similarity between each secondly updated label feature and the text features is determined as the label of the media data based on the second feature similarity, thereby improving the correlation between the determined label of the media data and the media data, avoiding the situation that the use object cannot accurately obtain effective information due to low label correlation, and further improving the personalized recommendation effect when each use object is recommended based on the media data.
[0214] It should be understood that, although each step in the flowchart involved in the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.
[0215] Based on the same inventive concept, the embodiments of the present application also provide a label processing device for implementing the above-mentioned label processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more label processing device embodiments provided below can refer to the limitations of the label processing method in the above text, which will not be repeated here.
[0216] In one embodiment, as shown in Figure 10 A label processing device is provided, comprising: an extraction module 1002, an initial updating module 1004, a secondary updating module 1006, and a label screening module 1008, wherein:
[0217] The extraction module 1002 is configured to extract text features of the text and label features of each candidate label contained in the text from media data containing the text, respectively.
[0218] The first updating module 1004 is configured to perform feature updating on each label feature based on a first feature similarity between the label features, to obtain first-updated label features.
[0219] The second updating module 1006 is configured to perform second updating on the first-updated label features according to a co-occurrence relationship of each candidate label in historical media data, to obtain second-updated label features.
[0220] The label screening module 1008 is configured to determine, based on a second feature similarity between each second-updated label feature and the text feature, a target label that satisfies a similarity condition in the second feature similarity as a label of the media data.
[0221] In the label processing apparatus, the text feature of the text and the label feature of each candidate label contained in the text are extracted from the media data containing the text, the first-updated label features are obtained by performing feature updating on each label feature based on a first feature similarity between the label features, and the relevance between the first-updated label features is improved. The second-updated label features are obtained by performing second updating on the first-updated label features according to a co-occurrence relationship of each candidate label in historical media data, and the relevance between the second-updated label features is further improved. Finally, the target label that satisfies the similarity condition in the second feature similarity is determined as a label of the media data based on a second feature similarity between each second-updated label feature and the text feature, and the relevance between the determined label of the media data and the media data is improved, the situation that the use object cannot accurately obtain effective information due to low label relevance is avoided, and the personalized recommendation effect when each use object is recommended based on the media data is further improved.
[0222] In one embodiment, a label processing apparatus is provided, further comprising a second feature similarity determination module configured to: determine a text feature similarity between at least two text features; perform feature updating on the at least two text features respectively according to the text feature similarity, to obtain a text feature combination comprising the updated at least two text features; and determine a second feature similarity between each second-updated label feature and the text feature combination respectively.
[0223] In an embodiment, the second feature similarity determining module is further configured to: determine a sub-similarity between each text feature in the text feature set and each secondary update label feature; and determine a second feature similarity between the text feature set and each secondary update label feature by data fusion of the sub-similarities corresponding to the same secondary update label feature.
[0224] In an embodiment, the second feature similarity determining module is further configured to: update the title text feature and the content text feature based on the text feature similarity between the title text feature and the content text feature, to obtain an updated title text feature and an updated content text feature; and determine a second feature similarity of each secondary update label feature by data fusion of a first sub-similarity between the secondary update label feature and the updated title text feature and a second sub-similarity between the secondary update label feature and the updated content text feature.
[0225] In an embodiment, the extracting module is further configured to: identify a title text and a content text of the media data; extract a title text feature of the title text and a content text feature of the content text; perform label identification on the title text and the content text respectively to obtain candidate labels, the candidate labels including labels in the title text and labels in the content text; and extract a label feature of each candidate label.
[0226] In an embodiment, the second feature similarity determining module is further configured to: determine a text feature similarity between the title text feature and the content text feature; determine a first feature weight matched by the title text feature and a second feature weight matched by the content text feature based on the text feature similarity; update the title text feature based on the first feature weight to obtain an updated title text feature, and update the content text feature based on the second feature weight to obtain an updated content text feature.
[0227] In an embodiment, the initial update module is further configured to: determine a third feature weight matched by each target label feature in each label feature to be updated by data fusion of a first feature similarity between the target label feature and each of the remaining label features; and update the target label feature based on the third feature weight matched by the target label feature to obtain an initial update label feature.
[0228] In an embodiment, the secondary updating module is further configured to: construct a label co-occurrence relationship graph according to co-occurrence relationships between the candidate labels in the historical media data; obtain, for each candidate label in the label co-occurrence relationship graph, a connection candidate label having a connection relationship with the candidate label in the label co-occurrence relationship graph, and determine a third feature similarity between a label feature of the connection candidate label and a label feature of the candidate label; determine a fourth feature weight matched by a primary updated label feature of the candidate label according to a third feature similarity matched by the candidate label; and perform secondary updating on the primary updated label feature of the candidate label based on the fourth feature weight matched by the primary updated label feature, to obtain a secondary updated label feature.
[0229] In an embodiment, the secondary updating module is further configured to: combine each candidate label in pairs to obtain a plurality of candidate label groups; obtain a co-occurrence number of two candidate labels in each candidate label group in the historical media data; determine a co-occurrence probability of the candidate labels in the candidate label group according to the co-occurrence number; perform deduplication processing on candidate labels included in a target label group in the candidate label group, which meets a probability condition, to determine candidate labels obtained after the deduplication processing as nodes of the label co-occurrence relationship graph, and determine a connection relationship between the nodes based on the target label group; and construct the label co-occurrence relationship graph based on the nodes and the connection relationship between the nodes.
[0230] In an embodiment, a label processing apparatus is provided, and further includes a target similarity screening module configured to: determine a preset similarity threshold corresponding to a preset similarity condition, and screen target similarities greater than the preset similarity threshold from the second feature similarities; or sort the second feature similarities according to similarity value sizes to obtain a corresponding feature similarity sequence, and screen a preset number of target similarities from the feature similarity sequence according to the preset similarity condition.
[0231] In an embodiment, a label processing apparatus is provided, and further includes a label fusion model training module configured to: obtain pre-labeled media data samples; extract, from each media data sample containing text, a sample text feature of the text and a sample label feature of each candidate label contained in the text; perform feature updating on each sample label feature based on a first feature similarity between the sample label features to obtain a primary updated sample label feature; perform secondary updating on the primary updated sample label feature according to a co-occurrence relationship of each candidate label in the historical media data to obtain a secondary updated sample label feature; determine a second feature similarity between each secondary updated sample label feature and the sample text feature; determine a prediction loss value corresponding to each second feature similarity; and if the prediction loss value meets a model convergence condition, complete training of the original label fusion model to obtain a trained label fusion model.
[0232] In one embodiment, the label fusion model training module is further configured to: obtain the original label relevance based on the pre-annotated original labels of each candidate label when no new label is detected; determine the prediction loss value based on the similarity of each second feature and the original label relevance; and determine the preset fixed value as the prediction loss value corresponding to each new label when a new label is detected and the new label does not carry the corresponding original label relevance.
[0233] Each module in the aforementioned tag processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0234] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The database stores media data containing text, textual features of the text, candidate tags, tag features of candidate tags, first feature similarity, initial updated tag features, co-occurrence relationships of candidate tags in historical media data, second updated tag features, second feature similarity, target tags, and tags for the media data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a tag processing method.
[0235] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0236] In an embodiment, a computer device is also provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.
[0237] In an embodiment, a computer readable storage medium is provided, storing a computer program, which, when executed by a processor, implements the steps in the above method embodiments.
[0238] In an embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps in the above method embodiments.
[0239] It should be noted that the object information (including but not limited to the object's device information, corresponding personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0240] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0241] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0242] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A label processing method, characterized in that, The method includes: From the media data containing text, extract the text features of the text and the tag features of each candidate tag contained in the text. Based on the first feature similarity between each of the label features, feature updates are performed on each of the label features to obtain the initial updated label features; Based on the co-occurrence relationship of each candidate tag in historical media data, the initial updated tag features are updated a second time to obtain the secondary updated tag features. Based on the second feature similarity between each of the secondary updated label features and the second feature of the text feature, the target label whose second feature similarity among the candidate labels meets the similarity condition is determined as the label of the media data.
2. The method according to claim 1, characterized in that, The text includes at least two types of text, and the text features include at least two text features that correspond one-to-one with the at least two types of text. The method further includes: Determine the text feature similarity between the at least two text features; Based on the text feature similarity, the at least two text features are updated respectively to obtain a text feature combination including the updated at least two text features; The second feature similarity between each of the secondary updated label features and the text feature combinations is determined.
3. The method according to claim 2, characterized in that, The step of determining the second feature similarity between each of the secondary updated label features and the text feature combinations includes: For each of the secondary updated label features, determine the sub-similarity between the label feature and each text feature in the combination of the text features; The sub-similarity values corresponding to the same secondary update label feature are fused together, and the result of the data fusion is determined as the second feature similarity between the secondary update label feature and the text feature combination.
4. The method according to claim 1, characterized in that, The media data includes title text and content text, and the text features include the title text features of the title text and the content text features of the content text; The method further includes: Based on the text feature similarity between the title text features and the content text features, the title text features and the content text features are updated respectively to obtain updated title text features and updated content text features; For each of the secondary update tag features, the first sub-similarity between the secondary update tag feature and the updated title text feature, and the second sub-similarity between the secondary update tag feature and the updated content text feature are fused to obtain the second feature similarity matched by each secondary update tag feature.
5. The method according to claim 4, characterized in that, The step of extracting text features of the text and tag features of each candidate tag contained in the text from media data containing text includes: Identify the title text and content text of the media data; Extract the title text features of the title text and the content text features of the content text; Tag recognition is performed on the title text and the content text respectively to obtain candidate tags, which include tags in the title text and tags in the content text; Extract the label features of each candidate label.
6. The method according to claim 4, characterized in that, The step of updating the title text features and the content text features based on the text feature similarity between the title text features and the content text features to obtain updated title text features and updated content text features includes: Determine the text feature similarity between the title text features and the content text features; Based on the text feature similarity, determine the first feature weight matched by the title text feature and the second feature weight matched by the content text feature; The title text features are updated according to the first feature weight to obtain updated title text features, and the content text features are updated according to the second feature weight to obtain updated content text features.
7. The method according to any one of claims 1 to 6, characterized in that, The step of updating the features of each label feature based on the first feature similarity between the label features to obtain the initial updated label features includes: For each target label feature to be updated among the label features, the first feature similarity between the target label feature and each of the other label features is fused to obtain the third feature weight matched by each target label feature. Based on the third feature weight matched by the target label features, the target label features are updated to obtain the initial updated label features.
8. The method according to any one of claims 1 to 6, characterized in that, Based on the co-occurrence relationship of each candidate tag in historical media data, the initially updated tag features are updated a second time to obtain the second-updated tag features, including: Based on the co-occurrence relationships among the candidate tags in the historical media data, a tag co-occurrence relationship graph is constructed; For each candidate label in the label co-occurrence graph, obtain the connecting candidate labels that have a connection relationship with the candidate label in the label co-occurrence graph, and determine the third feature similarity between the label features of the connecting candidate labels and the label features of the candidate labels; Based on the third feature similarity matched by the candidate label, the weight of the fourth feature matched by the initial updated label feature of the candidate label is determined. Based on the fourth feature weight matched by the initial updated label features, the initial updated label features of the candidate labels are updated a second time to obtain the second updated label features.
9. The method according to claim 8, characterized in that, The step of constructing a tag co-occurrence relationship graph based on the co-occurrence relationships among the candidate tags in the historical media data includes: The candidate labels are combined in pairs to obtain multiple candidate label groups; Obtain the number of times two candidate tags in each candidate tag group co-occur in the historical media data; Based on the number of co-occurrences, determine the co-occurrence probability of candidate tags in the candidate tag group; The candidate tags included in the target tag group whose co-occurrence probability meets the probability condition of the candidate tag group are deduplicated. The candidate tags obtained after deduplication are determined as nodes of the tag co-occurrence relationship graph, and the connection relationship between the nodes is determined based on the target tag group. Based on the nodes and the connections between them, a tag co-occurrence relationship graph is constructed.
10. The method according to claim 1, characterized in that, The tags of the media data are determined based on a trained tag fusion model; the training process of the tag fusion model includes: Obtain pre-labeled media data samples; From each media data sample containing text, extract the sample text features of the text and the sample label features of each candidate label contained in the text; Based on the first feature similarity between each of the sample label features, feature updates are performed on each of the sample label features to obtain the initial updated sample label features; Based on the co-occurrence relationship of each candidate label in historical media data, the initial updated sample label features are updated a second time to obtain the secondary updated sample label features. Determine the similarity between the second feature of each of the secondary updated sample label features and the second feature of the sample text features; Determine the predicted loss value corresponding to each of the second feature similarities; If the predicted loss value reaches the model convergence condition, the training of the original label fusion model is completed, and the trained label fusion model is obtained.
11. The method according to claim 10, characterized in that, Determining the prediction loss value corresponding to each of the second feature similarities includes: If no new labels are detected, obtain the original label relevance based on the pre-annotated candidate labels; determine the prediction loss value based on the second feature similarity and the original label relevance. If a new label is detected and the new label does not carry the corresponding relevance of the original label, a preset fixed value is determined as the prediction loss value corresponding to each new label.
12. A label processing device, characterized in that, The device includes: The extraction module is used to extract the text features of the text and the tag features of each candidate tag contained in the text from the media data containing the text. The initial update module is used to update each of the label features based on the first feature similarity between the label features to obtain the initial updated label features. The secondary update module is used to perform a secondary update on the tag features of the first update according to the co-occurrence relationship of each candidate tag in historical media data, so as to obtain the secondary updated tag features. The tag filtering module is used to determine the target tags whose second feature similarity meets the similarity condition among the candidate tags as tags of the media data, based on the second feature similarity of each of the secondary updated tag features and the second feature similarity of the text features.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Method and device for determining video tags, storage medium and terminal device
CN108829893A
Label identification method and device, computer equipment, storage medium and program product
CN113627447A