Content understanding method and device, readable medium, electronic equipment and program product
Through the large language model, the content is semantic understanding and semantic generalization is solved, and the problem that word frequency characteristics in the prior art cannot accurately express attribute information is achieved, achieving more efficient and accurate object analysis.
Patent Information
- Application Number
- CN202510489120.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-22
AI Technical Summary
In the prior art, vocabulary extracted based on word frequency features cannot accurately express the attribute information of the content-related object, which affects the efficiency and accuracy of object analysis.
The content is semanticly understood through a large language model, and attribute words that meet the preset attribute definition are extracted based on the preset attribute definition, and semantic summary is performed to obtain the target attribute word.
It improves the comprehensiveness and accuracy of content understanding, reduces the complexity of attribute words, and improves the efficiency and accuracy of object analysis.
Smart Images

Figure CN120353919A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of large language models, machine learning models, and computer technologies. Specifically, it relates to a content understanding method, apparatus, readable medium, electronic device, and program product. Background Art
[0002] In related technologies, popular words can be extracted from object-related content based on word frequency features for object analysis. However, the words extracted based on word frequency features may not accurately express the attribute information of the content-related object, thereby affecting the efficiency and accuracy of object analysis. Summary of the Invention
[0003] This Summary of the Invention section is provided to introduce concepts in a brief form that will be described in detail in the subsequent Detailed Description section. This Summary of the Invention section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, the present disclosure provides a content understanding method, which includes: Obtain first content associated with a first object; Process the first content through a large language model to obtain target attribute words for describing the first object, where the large language model is used to obtain the target attribute words through the following processing: Perform semantic understanding on the first content according to a preset attribute definition associated with the first object to obtain first attribute words that conform to the preset attribute definition; Perform semantic generalization based on the first attribute words to obtain the target attribute words.
[0005] In a second aspect, the present disclosure provides a content understanding apparatus, which includes: An obtaining module, configured to obtain first content associated with a first object; A processing module, configured to process the first content through a large language model to obtain target attribute words for describing the first object, where the large language model is used to obtain the target attribute words through the following processing: Perform semantic understanding on the first content according to a preset attribute definition associated with the first object to obtain first attribute words that conform to the preset attribute definition; Perform semantic generalization based on the first attribute words to obtain the target attribute words.
[0006] In a third aspect, the present disclosure provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect are implemented.
[0007] Fourthly, the present disclosure provides an electronic device, including: a storage device storing a computer program thereon; a processing device configured to execute the computer program in the storage device to implement the steps of the method in the first aspect.
[0008] Fifthly, the present disclosure provides a computer program product including a computer program, which when executed by a processor implements the steps of the method in the first aspect.
[0009] Through the above technical solutions, the large language model can perform semantic understanding on the first content associated with the first object according to the preset attribute definition associated with the first object, and first attribute words that conform to the preset attribute definition can be obtained. Furthermore, semantic generalization can be performed based on the first attribute words to obtain target attribute words for describing the first object. By adopting the above method, semantic understanding of the content is combined with the preset attribute definition, which can improve the comprehensiveness and accuracy of content understanding, ensure that the first attribute words extracted can accurately represent the attribute information of the first object, and then perform semantic generalization on the attribute words, which can reduce the complexity of the attribute words and improve the accuracy of attribute word extraction. In the object analysis scenario, based on the generalized target attribute words, the efficiency and accuracy of object analysis can be improved.
[0010] Other features and advantages of the present disclosure will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In combination with the drawings and with reference to the following specific implementation, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic, and the original components and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a flowchart of a content understanding method shown according to an exemplary embodiment of the present disclosure; Figure 2 is a schematic diagram of a content understanding process shown according to an exemplary embodiment of the present disclosure; Figure 3 is a schematic diagram of a preset attribute definition shown according to an exemplary embodiment of the present disclosure; Figure 4 is a schematic diagram of a prompt word shown according to an exemplary embodiment of the present disclosure; Figure 5 is a comparison schematic diagram of before and after model optimization shown according to an exemplary embodiment of the present disclosure; Figure 6It is a schematic process diagram of mental word extraction shown according to an exemplary embodiment of the present disclosure; Figure 7 It is a structural block diagram of a content understanding device shown according to an exemplary embodiment of the present disclosure; Figure 8 It is a schematic structural diagram of an electronic device shown according to an exemplary embodiment of the present disclosure. Detailed implementation manners
[0012] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0013] It should be understood that the steps recited in the method embodiments of the present disclosure can be executed in different orders and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0014] The term "including" and its variations used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0015] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.
[0016] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".
[0017] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0018] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0019] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0020] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0021] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0022] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0023] In related technologies, brands can promote content on social media platforms. With user authorization, social media platforms can extract popular words or hot topics from social media content based on word frequency features to provide support for brand content creation and content analysis.
[0024] However, the words extracted based on word frequency features may not be able to accurately express the attribute information of the content-related object. For example, when a user mentions "this product can whiten and tenderize the skin" and "this product has a good whitening and tenderizing effect", the relevant technology often extracts the high-frequency word "whitening and tenderizing", and fails to understand that "whitening" and "skin tendering" describe the two functional attributes of the product. Or when a user mentions "this product is super moisturizing" and "super moisturizing, super easy to use", the relevant technology often extracts "super moisturizing", and fails to summarize the more accurate attribute word "moisturizing" from the complex description, thereby affecting the efficiency and accuracy of object analysis. For example, it causes the brand to be unable to accurately grasp the consumer's overall perception and evaluation of the brand, which in turn affects the brand's content creation and leads to low content promotion efficiency.
[0025] In view of this, the present disclosure provides a content understanding method, apparatus, readable medium, electronic device, and program product to solve the above technical problems.
[0026] The following further explains the embodiments of the present disclosure in conjunction with the accompanying drawings.
[0027] Figure 1 is a flowchart of a content understanding method shown according to an exemplary embodiment of the present disclosure. Referring to Figure 1 , the method may include the following steps: S101: Obtain the first content associated with the first object.
[0028] In this embodiment, the first object may be a brand or the category to which the brand belongs, or it may be a commodity or a live broadcast room. Of course, it may also be other objects, and the embodiments of the present disclosure do not impose any restrictions on this. Among them, the category to which the brand belongs may refer to the industry to which the brand belongs, such as industries like cosmetics, electronics, food, automobiles, or smart homes. The first content may be content in the form of short videos, long videos, graphics, texts, audios, etc. obtained under user authorization. Taking the content associated with the brand as an example, it may include promotional videos, promotional articles, and other promotional content released by the brand party or creators such as anchors and bloggers who cooperate with the brand party on social media platforms, as well as comment content of users on the promotional content, evaluation content of users after purchasing the brand's products, and search content of users on social media platforms. The embodiments of the present disclosure do not impose any restrictions on this.
[0029] Exemplarily, a content acquisition task may be set to periodically and batch obtain content related to the object from the social media platform, laying a foundation for the accuracy and recall rate of attribute word extraction. As Figure 2 shown, in the case where the first content includes voice content, the voice content may be recognized and the corresponding text content may be extracted through a voice recognition extraction service. In the case where the first content includes character content, the character content may be recognized and the corresponding text content may be extracted through a character recognition extraction service. So as to process the text content through a large language model to obtain attribute words for describing the first object.
[0030] S102: Process the first content through a large language model to obtain target attribute words for describing the first object, where the large language model is used to obtain the target attribute words through the following processing: perform semantic understanding on the first content according to the preset attribute definition associated with the first object to obtain first attribute words that conform to the preset attribute definition; perform semantic generalization based on the first attribute words to obtain the target attribute words.
[0031] In this embodiment, when the first object is a brand, the attribute words of the first object can be a summary of various descriptive contents of the brand or product from the perspective of the brand owner, such as descriptions of the product functions, product origins, and certification information of the brand, or a summary of various descriptive contents of the brand or product from the perspective of users, such as brand impressions and product evaluations. Based on the attribute words of the brand, the mental words of the brand mind can be further analyzed. Among them, the brand mind is used to represent the cognition and impression formed by consumers of the brand, and the mental words are the concrete expressions of the brand mind and the key information that the brand hopes consumers will remember, covering aspects such as the personality characteristics, product advantages, and brand styles of the brand. For example, the attribute words can be "0 sugar", "sugar-free", "no added sugar", and the mental words can be "zero sugar", etc. The present disclosure does not limit this.
[0032] Correspondingly, when the first object is an industry, the attribute words of the first object can be a summary of various descriptive contents of the brands in that industry for the brand or product, or a summary of various descriptive contents of the brands in that industry for the brand or product from the perspective of users. Based on the attribute words of the industry, the mental words of the industry mind can be further analyzed.
[0033] The brand mind or industry mind can help the brand owner more comprehensively and accurately understand the cognitive information of consumers about the brand or industry, and then optimize the promotion content and improve the content promotion efficiency.
[0034] In a possible way, semantic generalization is performed on the first attribute word to obtain a target attribute word, including: performing semantic splitting on the first attribute word to obtain a second attribute word with a single semantics; performing semantic generalization on the second attribute word to obtain the target attribute word.
[0035] It should be noted that the target attribute word can be obtained by processing the first content through a large language model, or as Figure 2 shown, an extraction model, a splitting model, and a generalization model are trained respectively, and these three models are used to process the first content in a process to obtain the target attribute word. Among them, the extraction model is used to perform semantic understanding on the first content according to the preset attribute definition associated with the first object to obtain the first attribute word that conforms to the preset attribute definition. The splitting model is used for the splitting model, and the generalization model is used to perform semantic generalization on the second attribute word to obtain the target attribute word. The extraction model, the splitting model, and the generalization model can be large language models, which can be specifically set according to requirements. The present disclosure does not limit this.
[0036] Exemplarily, as Figure 2As shown, semantic understanding of the example content can be performed according to the predefined attributes. "Gaga whitening and skin rejuvenation" can be extracted. Since the extracted attribute words may be obtained by combining multiple attribute words, semantic splitting is required to obtain "Gaga whitening" and "Gaga skin rejuvenation" with single semantics. The split attribute words may also include modifiers, so semantic generalization can be performed to obtain "whitening" and "skin rejuvenation", thereby improving the accuracy of the attribute words and avoiding bridging phenomena in the subsequent clustering analysis of the attribute words.
[0037] By adopting the above method and combining the predefined attributes to perform semantic understanding of the content, the comprehensiveness and accuracy of content understanding can be improved, so as to obtain the first attribute words that conform to the predefined attributes, ensure that the extracted first attribute words can represent the attribute information of the first object, and then perform semantic generalization on the attribute words, which can reduce the complexity of the attribute words and improve the accuracy of attribute word extraction. In the object analysis scenario, the efficiency and accuracy of object analysis can be improved based on the generalized target attribute words.
[0038] To facilitate understanding of the content understanding method provided by the present disclosure, the possible implementation manners in the present disclosure will be described below.
[0039] In a possible manner, the predefined attribute definition is obtained by defining the attributes under each classification, and the attributes under each classification are obtained by classifying the attributes of the category to which the first object belongs.
[0040] Exemplarily, the predefined attribute definition can be obtained by pre-defining the attributes for different categories. For example, different attribute classifications are set for different industries such as beauty, food, and electronic products, so that it can be applicable to business scenarios of different industries with different professional terms, improve domain adaptability, and improve the accuracy of extracting attribute words. For example, the beauty industry may involve product functions and effects, the food industry may involve taste and texture, and electronic products may involve product functions and appearance, etc. The embodiments of the present disclosure do not impose any restrictions on this.
[0041] Among possible ways, the classifications in the preset attribute definition include at least one of a first classification, a second classification, and a third classification; the first classification includes a first subclass for classifying object attributes for describing a first object and / or a second subclass for classifying product attributes associated with the first object; the second classification includes at least one of a third subclass for classifying characteristic attributes for generally describing the first object, a fourth subclass for classifying functional attributes of a product associated with the first object, and a fifth subclass for classifying feedback attributes of a user on a product associated with the first object; the third classification includes at least one of a sixth subclass for classifying sub-characteristic attributes under the characteristic attributes, a seventh subclass for classifying sub-functional attributes under the functional attributes, and an eighth subclass for classifying sub-feedback attributes under the feedback attributes.
[0042] In this embodiment, the first classification, the second classification, and the third classification in the preset attribute definition can be configured according to requirements. For example, one-level classification can be configured, or multi-level classification can be configured. Specifically, it can be configured according to requirements, and the embodiments of the present disclosure do not impose any restrictions on this.
[0043] Exemplarily, as Figure 3 shown, the first subclass in the first classification can be an attribute classification for the brand dimension, and the second subclass can be an attribute classification for the product dimension. The third subclass in the second classification can be an attribute classification for brand characteristics under the brand dimension, the fourth subclass can be an attribute classification for product functions under the product dimension, and the fifth subclass can be an attribute classification for user feedback under the product dimension. The first classification and the second classification can be general classifications across the industry, while the third classification can be set differently for different industries, so as to set corresponding attribute classifications for different industries, improve domain adaptability, and improve the accuracy of extracting attribute words.
[0044] Exemplarily, continuing to refer to Figure 3 , taking the food industry as an example, the third classification can include attribute classifications for different product functions such as the taste, packaging and transportation, ingredients, and efficacy of food, and can also include attribute classifications for different user feedback such as user evaluations, product pronouns, and usage scenarios, and can also include attribute classifications for different brand characteristics such as brand identity recognition, brand certification, brand style, and brand story. Specifically, it can be configured according to requirements, and the embodiments of the present disclosure do not impose any restrictions on this.
[0045] The above attribute definitions for different industries can be obtained by analyzing and summarizing specific business scenarios and a large amount of content data. Taking the content promotion field as an example, it can include key features, core needs, pain points, and other important elements of each industry in content promotion. The embodiments of the present disclosure do not impose any restrictions on this. By configuring corresponding attribute definitions for different industries, the accuracy of structured analysis of content can be improved, and further the accuracy and precision of extracting attribute words of content-related objects can be enhanced, so as to obtain attribute information of content-related objects from different dimensions and analyze users' cognitive information about content-related objects from different dimensions. For example, it can help brand owners gain a more comprehensive and accurate understanding of consumers' perception of the brand, and then optimize promotional content and improve content promotion efficiency.
[0046] In a possible way, the large language model is used to process the first content to obtain target attribute words for describing the first object, including: among multiple large language models for different object categories, the large language model corresponding to the category to which the first object belongs is called to process the first content to obtain target attribute words for describing the first object.
[0047] Exemplarily, since there are differences in attribute words for different object categories, as Figure 2 shown, corresponding large language models can be trained for different object categories. Furthermore, the large language model of the corresponding category can be selected and called according to the category to which the content-related object belongs to process the content in a targeted manner, so as to improve the accuracy of extracting attribute words for different industries.
[0048] Exemplarily, multiple large language models can be integrated into one intelligent agent according to requirements, or can be separately deployed in different intelligent agents. The embodiments of the present disclosure do not impose any restrictions on this.
[0049] In a possible way, the large language model is used to process the first content to obtain target attribute words for describing the first object, including: the large language model processes the first content according to the prompt words to obtain target attribute words for describing the first object, and the prompt words are used to instruct the large language model to extract attribute words from the first content, and the prompt words include preset attribute definitions; semantic understanding of the first content is performed according to the preset attribute definition associated with the first object to obtain the first attribute word that conforms to the preset attribute definition, including: semantic understanding of the first content is performed according to the preset attribute definition in the prompt words, and the attribute word in the first content that matches the semantics of the preset attribute definition is determined as the first attribute word.
[0050] Exemplarily, a prompt word including a preset attribute definition and the first content can be input into a large language model together, so that the large language model extracts the attribute words in the first content that match the semantics of the preset attribute definition, obtains the attribute words that conform to the attribute definition, and improves the extraction standardization and accuracy of the attribute words.
[0051] In a possible way, the prompt word further includes at least one of a sample example, a model role definition, a comparison example, and an exception handling instruction.
[0052] Exemplarily, as Figure 4 shown in the prompt word example, the sample example includes example content and example attribute words determined based on the example content. By clarifying the examples of attribute word extraction, the stability of the output format and the accuracy of attribute word recognition can be effectively improved. The model role definition information is used to instruct the large language model to extract attribute words from the first content based on the category to which the first object belongs. Different prompt word features can be adopted for different object categories. For example, the role of the large language model can be explicitly set or professional terms in different fields can be emphasized. For example, in the beauty industry, there are terms such as "makeup effect" and "color number", etc., so as to improve the recognition accuracy of professional terms.
[0053] Exemplarily, continue to refer to as Figure 4 shown in the prompt word example, the comparison example includes a comparison example of easily confused attribute words and / or a comparison example of opposite semantic attribute words. For example, positive and negative examples can be used to illustrate easily confused concept scenarios, or examples can be given for the attribute words extracted when opposite semantics appear in the input content. For example, when the opposite semantics appear in the content "can be anti-allergic", the attribute words "Classification 1: anti-allergic; Classification 2: allergic" can be extracted, etc. Through the comparison example, the semantic boundary can be strengthened and the accuracy of the model's understanding of the content semantics can be improved.
[0054] Exemplarily, continue to refer to as Figure 4 shown in the prompt word example, the exception handling instruction is used to instruct the large language model to perform homophone processing on the content obtained by speech recognition and / or perform word order or similar character correction processing on the content obtained by character recognition. Since there are certain errors in the recognition technologies for different forms of content, by providing the exception handling instruction, the noise anti-interference ability of the large language model can be improved, and further the accuracy of attribute word extraction can be improved.
[0055] It should be noted that the above prompt word content can select one or more of them according to the actual business scenario, or the prompt word can be adjusted through continuous iterative training to select the prompt word suitable for the large language model of the present disclosure embodiment. The present disclosure embodiment does not make any restrictions on this.
[0056] Since general large language models have limitations in the vertical task of extracting attribute words, the large language model can be fine-tuned to obtain a large language model with a higher precision-recall rate.
[0057] In a possible way, the large language model is trained as follows: obtaining the sample content associated with the second object as the initial training sample; training the initial large language model with the training sample to obtain a new large language model; obtaining new sample content, and using the new sample content and the training sample as the new training sample, where the object associated with the new sample content is the same as or different from the second object; repeating the steps of training the new large language model with the new training sample and obtaining new content samples until the first preset completion condition is met, to obtain the trained large language model.
[0058] Among them, during the training process of the large language model, the number of attribute words in the training sample of the previous training process is less than the number of attribute words in the training sample of the subsequent training process.
[0059] Exemplarily, the first preset completion condition can be a preset training round threshold or an extraction accuracy threshold, etc., and the present disclosure does not limit this. The number of attribute words represents the token number of the model. By gradually increasing the training sample during the iterative training process of the model, the token number can be gradually increased, and the difficulty of the model training task also gradually increases. That is to say, the task difficulty is gradually increased by progressive learning, providing the model with opportunities for continuous challenge and growth.
[0060] It should be noted that the training sample can be increased sequentially in each round of iterative training, or gradually increased periodically or under certain preset conditions. The embodiments of the present disclosure do not limit this in any way.
[0061] In a possible way, training the initial large language model with the training sample to obtain a new large language model includes: performing random masking on the training sample to obtain a masked training sample; training the initial large language model with the masked training sample to obtain a new large language model.
[0062] Exemplarily, by performing random masking on the training sample, the generalization ability and robustness of the large language model can be enhanced.
[0063] It should be understood that during the model training process, parameters such as the learning rate, batch size, and number of training epochs of the large language model can be adjusted to ensure that the model can effectively learn task features during training. And during the model training process, the training samples can be labeled to optimize the model by comparing the loss between the sample labels and the model outputs. It can also be done manually, such as scoring the model outputs to guide model optimization. The present disclosure does not limit this.
[0064] In a possible way, the large language model includes a first large language model for extracting attribute words from the first type of content and a second large language model for extracting attribute words from the second type of content. The content length of the first type of content is greater than that of the second type of content, and the number of parameters of the first large language model is greater than that of the second large language model. The second large language model is trained as follows: obtaining the first type of content associated with the third object and the second type of content associated with the fourth object; processing the first type of content associated with the third object through the trained first large language model to obtain the third attribute words for describing the third object; using the first type of content associated with the third object, the second type of content associated with the fourth object, and the third attribute words as training samples to train the initial second large language model to obtain the trained second large language model.
[0065] Exemplarily, as Figure 2 shown, the large language model includes a first large language model for long text content and a second large language model for short text content. It should be noted that since the text length that the second large language model needs to process is less than that of the first large language model, the context features and position encoding features that need to be concerned when the model calculates attention are also less for the second large language model than for the first large language model. Therefore, the number of parameters of the trained first large language model is greater than that of the second large language model.
[0066] In this embodiment, the training processes of the first large language model and the second large language model can be trained separately with reference to the training process of the large language model described above, or after obtaining the trained first large language model based on the training process of the large language model described above, the second large language model can be trained based on the input content and output content of the first large language model. The embodiments of the present disclosure do not limit this in any way.
[0067] Exemplarily, after the first large language model is trained, the input content and output content of the first large language model are used as the training samples of the second large language model, so as to provide sample support for the model training of the second large language model, and then targeted training is carried out based on the training samples of short texts to improve the model's processing ability for short text content.
[0068] In a possible way, the first type of content associated with the third object, the second type of content associated with the fourth object, and the third attribute word are used as training samples to train the initial second large language model, and a trained second large language model is obtained, including: using the first type of content associated with the third object and the third attribute word as training samples to train the initial second large language model until a second preset completion condition is met, obtaining an intermediate second large language model; using the second type of content associated with the fourth object as a training sample to train the intermediate second large language model until a third preset completion condition is met, obtaining a trained second large language model.
[0069] Exemplarily, after the first large language model is trained, the input content and output content of the first large language model are used as training samples for the second large language model. When a certain training completion condition is met, the second large language model is incrementally trained based on the training samples of short texts, so that an epiphany phenomenon occurs during the training of the large language model for short texts, effectively improving the model training efficiency. The specific training completion condition can be set according to requirements. For example, it can be a preset training round threshold or an extraction accuracy threshold, etc. The present disclosure does not limit this.
[0070] In a possible way, the large language model is used to process the first content to obtain a target attribute word for describing the first object, including: when the first content is the first type of content, the first large language model is used to process the first content to obtain a target attribute word for describing the first object, and the first large language model is used to extract attribute words from the first type of content; when the first content is the second type of content, the second large language model is used to process the first content to obtain a target attribute word for describing the first object, and the second large language model is used to extract attribute words from the second type of content, and the content length of the first type of content is greater than the content length of the second type of content.
[0071] Exemplarily, in an actual business scenario, such as Figure 2 shown, the large language model for short text content and the large language model for long text content can be integrated into the same intelligent agent, and then the corresponding large language model is called for model processing according to the content length of the first content, so as to be able to perform targeted processing on content with different content lengths.
[0072] It should be noted that the above large language models for different categories and different content lengths are mainly for the step of semantically understanding the first content according to the preset attribute definition to obtain the first attribute word that conforms to the preset attribute definition. Therefore, such as Figure 2As shown in the figure, extraction models for different categories and different content lengths can be provided. The extraction models for different categories and different content lengths are trained separately, and the models are called according to the actual business scenarios. Then, a unified splitting model and summarization model are provided, that is, the splitting model and the summarization model do not need to be trained by category and content length, thereby improving the model reuse rate, simplifying the model training process, and improving the model training efficiency.
[0073] Using the above method, as Figure 5 shown in the figure, through a series of optimizations such as optimizing the prompt words and fine-tuning the large language models for different industries and different text lengths, the accuracy and recall rate of the large language models for extracting attribute words can be effectively improved.
[0074] In this embodiment, as Figure 6 shown in the figure, the prompt words including the preset attribute definitions can be input into the large language model of this embodiment, including the above extraction model, splitting model, and summarization model. The extraction model performs semantic understanding on the text content extracted from different forms of content and extracts the first attribute words that meet the attribute definitions. Then, the splitting model performs semantic splitting on the first attribute words to obtain the second attribute words with a single semantics. Further, the summarization model performs semantic summarization on the second attribute words to obtain the target attribute words. Information such as the occurrence frequency of the target attribute words can also be statistically analyzed here, and the present disclosure does not limit this.
[0075] Furthermore, subsequently, a clustering model can be used to cluster similar attribute words to obtain attribute groups, and a mental word extraction model can be used to perform semantic understanding and summary induction on the attribute words of the attribute groups to obtain the final brand mind. In this way, data statistics and analysis can be performed based on the brand mind. For example, it can help the brand party understand the hot topics, innovative forms, and popular trends in the industry, optimize the promotion content and promotion forms of the brand party, and improve the content promotion efficiency. And it can help the brand party understand the image and perception of the brand in the minds of users, timely discover negative evaluations and optimize them, and at the same time, it can also extract the advantages and highlights of the brand from positive evaluations, and then optimize the promotion content, etc. with this as a reference.
[0076] Based on the same concept, the embodiment of the present disclosure also provides a content understanding device, as Figure 7 shown in the figure, the content understanding device 700 includes: An acquisition module 701, configured to acquire the first content associated with the first object; A processing module 702, configured to process the first content through a large language model to obtain target attribute words for describing the first object, where the large language model is used to obtain the target attribute words through the following processing: Semantically understand the first content according to the preset attribute definition associated with the first object to obtain a first attribute word that conforms to the preset attribute definition; Based on the semantic generalization of the first attribute word, obtain the target attribute word.
[0077] Optionally, the processing module 702 is used for: Semantically split the first attribute word to obtain a second attribute word with a single semantics; Based on the semantic generalization of the second attribute word, obtain the target attribute word.
[0078] Optionally, the processing module 702 is used for: Process the first content by the large language model according to the prompt words to obtain the target attribute word for describing the first object. The prompt words are used to instruct the large language model to extract attribute words from the first content, and the prompt words include the preset attribute definition; Semantically understand the first content according to the preset attribute definition in the prompt words, and determine the attribute word in the first content that matches the semantics of the preset attribute definition as the first attribute word.
[0079] Optionally, the prompt words further include at least one of a sample example, a model role definition, a comparison example, and an exception handling description; Among them, the sample example includes example content and example attribute words determined based on the example content; the model role definition information is used to instruct the large language model to extract attribute words from the first content based on the category to which the first object belongs; the comparison example includes a comparison example of easily confused attribute words and / or a comparison example of opposite semantic attribute words; the exception handling description is used to instruct the large language model to perform homophone processing on the content obtained by speech recognition and / or perform word order or similar character correction processing on the content obtained by character recognition.
[0080] Optionally, the preset attribute definition is obtained by defining the attributes under each classification, and the attributes under each classification are obtained by classifying the attributes under the category to which the first object belongs.
[0081] Optionally, the content understanding device 700 includes a first training module, and the first training module is used for: Obtain the sample content associated with the second object as the initial training sample; Train the initial large language model with the training sample to obtain a new large language model; Obtain new sample content, and use the new sample content and the training samples as new training samples, where the object associated with the new sample content is the same as or different from the second object; Repeat the steps of training the new large language model with the new training samples and obtaining new content samples until a first preset completion condition is met, and obtain a trained large language model.
[0082] Optionally, during the training process of the large language model, the number of attribute words in the training samples of the previous training process is less than the number of attribute words in the training samples of the subsequent training process.
[0083] Optionally, the large language model includes a first large language model for extracting attribute words from the first type of content and a second large language model for extracting attribute words from the second type of content. The content length of the first type of content is greater than the content length of the second type of content, and the number of parameters of the first large language model is greater than the number of parameters of the second large language model. The content understanding device 700 includes a second training module, and the second training module is used for: Obtain the first type of content associated with the third object and the second type of content associated with the fourth object; Process the first type of content associated with the third object through the trained first large language model to obtain third attribute words for describing the third object; Use the first type of content associated with the third object, the second type of content associated with the fourth object, and the third attribute words as training samples to train the initial second large language model, and obtain a trained second large language model.
[0084] Optionally, the second training module is used for: Use the first type of content associated with the third object and the third attribute words as training samples to train the initial second large language model until a second preset completion condition is met, and obtain an intermediate second large language model; Use the second type of content associated with the fourth object as a training sample to train the intermediate second large language model until a third preset completion condition is met, and obtain a trained second large language model.
[0085] Optionally, the processing module 702 is used for: When the first content is the first type of content, process the first content through the first large language model to obtain target attribute words for describing the first object, and the first large language model is used for extracting attribute words from the first type of content; When the first content is of the second type, the first content is processed by a second large language model to obtain target attribute words for describing the first object. The second large language model is used to extract attribute words from the second type of content, and the content length of the first type of content is greater than that of the second type of content.
[0086] Optionally, the processing module 702 is configured to: Among multiple large language models for different object categories, call the large language model corresponding to the category to which the first object belongs to process the first content, and obtain target attribute words for describing the first object.
[0087] Based on the same concept, an embodiment of the present disclosure further provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processing device, the steps of any of the above content understanding methods are implemented.
[0088] Based on the same concept, an embodiment of the present disclosure further provides an electronic device, which may include: A storage device on which a computer program is stored; A processing device for executing the computer program in the storage device to implement the steps of any of the above content understanding methods.
[0089] Based on the same concept, an embodiment of the present disclosure further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any of the above content understanding methods are implemented.
[0090] Next, refer to Figure 8 , which shows a schematic structural diagram of an electronic device 800 suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not impose any limitations on the functions and usage scopes of the embodiments of the present disclosure.
[0091] As Figure 8As shown, the electronic device 800 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 801, which may perform various appropriate actions and processes according to a program stored in the read-only memory (ROM) 802 or a program loaded from the storage device 808 into the random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. The input / output (I / O) interface 805 is also connected to the bus 804.
[0092] Generally, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 8 the electronic device 800 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.
[0093] Specifically, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above functions defined in the method of the embodiment of the present disclosure are executed.
[0094] It should be noted that the above-mentioned computer-readable medium in the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0095] In some embodiments, communication can be carried out using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (for example, a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (for example, the Internet), and end-to-end networks (for example, ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0096] The above-mentioned computer-readable medium can be included in the above-mentioned electronic device; it can also exist separately without being assembled into the electronic device.
[0097] The above computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: obtain first content associated with a first object; process the first content through a large language model to obtain target attribute words for describing the first object, wherein the large language model is used to obtain the target attribute words through the following processing: perform semantic understanding on the first content according to a preset attribute definition associated with the first object to obtain first attribute words that conform to the preset attribute definition; and perform semantic generalization based on the first attribute words to obtain the target attribute words.
[0098] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partially on the user's computer, execute as a stand-alone software package, execute partially on the user's computer and partially on a remote computer, or execute entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0099] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0100] The modules described in the embodiments of the present disclosure may be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0101] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chip (SOCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0102] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM or Flash memory), an optical fiber, a portable compact disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0103] The above description is only a preferred embodiment of this disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in this disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features having similar functions disclosed in this disclosure.
[0104] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of separate embodiments can also be implemented combinatorially in a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0105] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms for implementing the claims. Regarding the devices in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated herein.
Claims
1. A content understanding method, characterized in that, The content understanding method includes: Obtain the first content associated with the first object; Process the first content through a large language model to obtain target attribute words for describing the first object, where the large language model is used to obtain the target attribute words through the following processing: Perform semantic understanding on the first content according to the preset attribute definition associated with the first object to obtain first attribute words that conform to the preset attribute definition; Perform semantic generalization based on the first attribute words to obtain the target attribute words.
2. The content understanding method according to claim 1, characterized in that, The performing semantic generalization based on the first attribute words to obtain the target attribute words includes: Perform semantic splitting on the first attribute words to obtain second attribute words with single semantics; Perform semantic generalization on the second attribute words to obtain the target attribute words.
3. The content understanding method according to claim 1, characterized in that, The processing the first content through a large language model to obtain target attribute words for describing the first object includes: Process the first content through the large language model according to the prompt words to obtain target attribute words for describing the first object, where the prompt words are used to instruct the large language model to extract attribute words from the first content, and the prompt words include the preset attribute definition; The performing semantic understanding on the first content according to the preset attribute definition associated with the first object to obtain first attribute words that conform to the preset attribute definition includes: Perform semantic understanding on the first content according to the preset attribute definition in the prompt words, and determine the attribute words in the first content that match the semantics of the preset attribute definition as the first attribute words.
4. The content understanding method according to claim 3, characterized in that, The prompt words further include at least one of a sample example, a model role definition, a comparison example, and an exception handling description; Wherein, the sample example includes example content and example attribute words determined based on the example content; the model role definition information is used to instruct the large language model to extract attribute words from the first content based on the category to which the first object belongs; the comparison example includes a comparison example of easily confused attribute words and / or a comparison example of opposite semantic attribute words; the exception handling description is used to instruct the large language model to perform homophone processing on the content obtained by speech recognition and / or perform word order or similar character correction processing on the content obtained by character recognition.
5. The content understanding method according to any one of claims 1-4, characterized in that The preset attribute definition is obtained by defining the attributes under each classification, and the attributes under each classification are obtained by classifying the attributes under the category to which the first object belongs.
6. The content understanding method according to any one of claims 1-4, characterized in that The large language model is trained through the following method: Obtain the sample content associated with the second object as the initial training sample; Perform model training on the initial large language model through the training sample to obtain a new large language model; Obtain new sample content, and use the new sample content and the training sample as the new training sample, where the object associated with the new sample content is the same as or different from the second object; Repeat the steps of performing model training on the new large language model through the new training sample and obtaining new content samples until a first preset completion condition is met to obtain a trained large language model.
7. The content understanding method according to claim 6, wherein During the training process of the large language model, the number of attribute words in the training samples of the previous training process is less than that in the training samples of the subsequent training process.
8. The content understanding method according to any one of claims 1-4, characterized in that The large language model includes a first large language model for extracting attribute words from the first type of content and a second large language model for extracting attribute words from the second type of content. The content length of the first type of content is greater than that of the second type of content, and the number of parameters of the first large language model is greater than that of the second large language model. The second large language model is trained in the following manner: Obtain the first type of content associated with the third object and the second type of content associated with the fourth object; Process the first type of content associated with the third object through the trained first large language model to obtain third attribute words for describing the third object; Use the first type of content associated with the third object, the second type of content associated with the fourth object, and the third attribute words as training samples to perform model training on the initial second large language model to obtain the trained second large language model.
9. The content understanding method according to claim 8, characterized in that, The step of using the first type of content associated with the third object, the second type of content associated with the fourth object, and the third attribute words as training samples to perform model training on the initial second large language model to obtain the trained second large language model includes: Use the first type of content associated with the third object and the third attribute words as training samples to perform model training on the initial second large language model until a second preset completion condition is met to obtain an intermediate second large language model; Use the second type of content associated with the fourth object as a training sample to perform model training on the intermediate second large language model until a third preset completion condition is met to obtain the trained second large language model.
10. The content understanding method according to any one of claims 1-4, characterized in that The step of processing the first content through the large language model to obtain target attribute words for describing the first object includes: When the first content is of the first type, process the first content through the first large language model to obtain target attribute words for describing the first object. The first large language model is used for extracting attribute words from the first type of content; When the first content is of the second type, process the first content through the second large language model to obtain target attribute words for describing the first object. The second large language model is used for extracting attribute words from the second type of content, and the content length of the first type of content is greater than that of the second type of content.
11. The content understanding method according to any one of claims 1-4, characterized in that The step of processing the first content through the large language model to obtain target attribute words for describing the first object includes: Among multiple large language models for different object categories, call the large language model corresponding to the category to which the first object belongs to process the first content to obtain target attribute words for describing the first object.
12. A content understanding device, characterized in that, The content understanding device includes: An acquisition module for acquiring the first content associated with the first object; A processing module, configured to process the first content through a large language model to obtain target attribute words for describing the first object, wherein the large language model is used to obtain the target attribute words through the following processing: Performing semantic understanding on the first content according to a preset attribute definition associated with the first object to obtain first attribute words that conform to the preset attribute definition; Performing semantic generalization based on the first attribute words to obtain the target attribute words.
13. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by a processing device, the computer program implements the steps of the method according to any one of claims 1-11.
14. An electronic device, characterized in that, Including: A storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1-11.
15. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-11.
