Text generation method and device, equipment, medium and program product

By generating co-occurring keyword pairs and labeling their sentiment attributes, and using a generative model to generate sentiment-oriented content summaries, the problem of inefficient user information mining and utilization is solved, and efficient use of user feedback and product optimization are achieved.

CN120671843APending Publication Date: 2025-09-19INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510821067.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing technologies are inefficient in user information mining and utilization, especially in automatically extracting user focus and converting it into emotion-oriented content summaries. This makes it difficult for companies to efficiently use user feedback information for product optimization and marketing.

Method used

By obtaining user information, we generate keyword pairs with co-occurrence relationships, annotate them with sentiment attributes, and use a generative model to generate sentiment-oriented content summaries.

Benefits of technology

It achieves accurate identification of the emotional tendencies of user feedback, generates intuitive and emotion-oriented content summaries, improves the efficiency of user information mining and utilization, and supports enterprises in product optimization and precision marketing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671843A_ABST
    Figure CN120671843A_ABST
Patent Text Reader

Abstract

The invention provides a text generation method which can be applied to the technical field of big data. The text generation method comprises the steps of obtaining user information; generating at least one keyword pair based on the user information; the keyword pair at least comprises a first vocabulary and a second vocabulary; the first vocabulary and the second vocabulary have a co-occurrence relationship; labeling each keyword pair to obtain a keyword pair with an emotional attribute; and generating a target text based on each keyword pair with the emotional attribute, wherein the target text is used for presenting a content abstract with emotional guidance. The invention further provides a text generation device and equipment, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data, specifically the field of data processing, and more specifically to a text generation method, device, equipment, medium and program product. Background Art

[0002] With the rapid development of social media, users have generated massive amounts of comments and feedback on various platforms, which contain valuable insights into products and services. However, current technologies for mining and utilizing this user information are inefficient, particularly in automatically extracting user focus and converting it into sentiment-driven content summaries. This makes it difficult for companies to effectively utilize this feedback for product optimization and marketing. Summary of the Invention

[0003] In view of the above problems, the present application provides a text generation method, apparatus, device, medium and program product.

[0004] According to a first aspect of the present application, a text generation method is provided, comprising:

[0005] Get user information;

[0006] generating at least one keyword pair based on the user information; the keyword pair includes at least a first word and a second word; and the first word and the second word have a co-occurrence relationship;

[0007] Marking each of the keyword pairs to obtain keyword pairs with sentiment attributes;

[0008] A target text is generated based on each of the keyword pairs with sentiment attributes, and the target text is used to present a content summary with sentiment orientation.

[0009] According to an embodiment of the present application, generating at least one keyword pair based on the user information includes:

[0010] Preprocessing the user information to obtain multiple words;

[0011] Performing part-of-speech tagging on the plurality of words to obtain a plurality of first words and a plurality of second words, wherein the part-of-speech of the first words is noun and the part-of-speech of the second words is adjective;

[0012] generating a graph based on the plurality of first vocabularies and the plurality of second vocabularies;

[0013] At least one keyword pair is determined based on a co-occurrence relationship between a first word and a second word in the graph.

[0014] According to an embodiment of the present application, the vertex of the graph is the first word or the second word, the edge of the graph represents the co-occurrence relationship between the two vertices, and the co-occurrence relationship represents the frequency of the two vertices appearing in the same preset window.

[0015] According to an embodiment of the present application, determining at least one keyword pair based on the co-occurrence relationship between the first word and the second word in the graph includes:

[0016] Calculating a score for each vertex in the graph;

[0017] sorting the plurality of first words and the plurality of second words according to the scores of the vertices to obtain a sorting result;

[0018] A preset number of keyword pairs are determined based on the ranking results, wherein the score of the keyword pair is the sum of the scores of the first word and the second word.

[0019] According to an embodiment of the present application, the tagging of each keyword pair to obtain a keyword pair with sentiment attributes includes:

[0020] Calculating the sentiment value of each keyword pair, where the sentiment value of each keyword pair is within a preset interval, and the preset interval includes at least a first interval and a second interval;

[0021] Determine the sentiment attribute of the keyword pair whose sentiment value is in the first interval as negative sentiment;

[0022] The emotional attribute of the keyword pair whose emotional value is in the second interval is determined to be positive emotion.

[0023] According to an embodiment of the present application, generating a target text based on each of the keyword pairs having sentiment attributes includes:

[0024] Each keyword pair with sentiment attributes is input into a generative model to obtain a target text output by the generative model.

[0025] According to an embodiment of the present application, the method further includes:

[0026] Send the target text to the review end and obtain the review opinion fed back by the review end;

[0027] When the review opinion of the target text is not passed, the target text is used as a negative sample to train the generative model.

[0028] A second aspect of the present application provides a text generation device, comprising:

[0029] Acquisition module, used to obtain user information;

[0030] A determination module, configured to generate at least one keyword pair based on the user information; the keyword pair includes at least a first word and a second word; the first word and the second word have a co-occurrence relationship;

[0031] A tagging module, configured to tag each of the keyword pairs to obtain keyword pairs with sentiment attributes;

[0032] A generating module is used to generate a target text based on each of the keyword pairs with emotional attributes, wherein the target text is used to present a content summary with emotional orientation.

[0033] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0034] The fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.

[0035] The fifth aspect of the present application further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:

[0037] Figure 1 Schematically illustrates an application scenario diagram of the text generation method, apparatus, device, medium, and program product according to an embodiment of the present application;

[0038] Figure 2 A flowchart of a text generation method provided according to an embodiment of the present application is schematically shown;

[0039] Figure 3 A flowchart of a text generation method according to another embodiment of the present application is schematically shown;

[0040] Figure 4 A schematic diagram of a vocabulary co-occurrence relationship graph structure provided according to an embodiment of the present application is shown schematically;

[0041] Figure 5 A flowchart of a text generation method according to another embodiment of the present application is schematically shown;

[0042] Figure 6 Schematically shows a flowchart of a text generation method according to another embodiment provided by an embodiment of the present application;

[0043] Figure 7 Schematically shows a target text generation architecture diagram based on a generative model provided according to an embodiment of the present application;

[0044] Figure 8 Schematically shows a structural block diagram of a text generation device according to an embodiment of the present application; and

[0045] Figure 9 A block diagram of an electronic device suitable for implementing a text generation method according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0046] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.

[0047] The terms used herein are only for describing specific embodiments and are not intended to limit this application. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0048] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0049] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0050] In the technical solution of this application, the user information involved (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, application and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0051] In the scenario of using personal information for automated decision-making, the text generation method, device and system provided in the embodiments of the present application provide users with corresponding operation entrances for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.

[0052] The embodiment of the present application provides a text generation method, comprising:

[0053] Get user information;

[0054] generating at least one keyword pair based on user information; the keyword pair includes at least a first word and a second word; and the first word and the second word have a co-occurrence relationship;

[0055] Label each keyword pair to obtain keyword pairs with sentiment attributes;

[0056] A target text is generated based on each keyword pair with sentiment attributes, and the target text is used to present a content summary with sentiment orientation.

[0057] By adopting the embodiment of the present application, user information is obtained, and then a keyword pair including a first word and a second word is generated based on the user information, wherein the keyword pair has a co-occurrence relationship, capturing the core semantic connection in the user expression. By labeling the keyword pairs with emotional attributes, the method can accurately identify the emotional tendency of user feedback, and then generate a target text based on the keyword pairs with emotional attributes. The generated target text presents a content summary with emotional orientation, so that the user's real needs and emotional reactions can be grasped intuitively. Compared with the existing technology, the embodiment of the present application not only automatically extracts the focus of user attention, but also enhances the emotional orientation of the content summary through emotional attribute analysis, solving the problem of low efficiency of user information mining and utilization in the existing technology, thereby providing enterprises with efficient use of user feedback for product optimization and precision marketing.

[0058] Figure 1 The application scenario diagram of the text generation method, apparatus, device, medium and program product according to the embodiments of the present application is schematically shown.

[0059] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables.

[0060] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).

[0061] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0062] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal devices.

[0063] It should be noted that the text generation method provided in the embodiment of the present application can generally be executed by the server 105. Accordingly, the text generation device provided in the embodiment of the present application can generally be set in the server 105. The text generation method provided in the embodiment of the present application can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the text generation device provided in the embodiment of the present application can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0064] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0065] The following will be based on Figure 1 The scene described by Figures 2 to 7 The text generation method according to the embodiment of the present application is described in detail.

[0066] Figure 2 A flowchart of a text generation method provided according to an embodiment of the present application is schematically shown.

[0067] like Figure 2 As shown, the text generation method of this embodiment includes operations S210 to S240, and the text generation method can be executed by a server.

[0068] Operation S210, obtaining user information;

[0069] Operation S220: generating at least one keyword pair based on the user information; the keyword pair includes at least a first word and a second word; and the first word and the second word have a co-occurrence relationship;

[0070] Operation S230: labeling each keyword pair to obtain keyword pairs with sentiment attributes;

[0071] In operation S240 , a target text is generated based on each keyword pair having sentiment attributes, where the target text is used to present a content summary having sentiment orientation.

[0072] In an embodiment of the present application, before obtaining user information in the above-mentioned operation S210, the user's consent or authorization may be obtained. For example, before operation S210, a request to obtain user information may be issued to the user. If the user agrees or authorizes to obtain user information, the above-mentioned operation S210 is performed.

[0073] In the above operation S210, user information refers to the text, comments, feedback and other related data generated by users on various platforms or applications. In the embodiment of the present application, it can be understood as text information containing users' evaluation, description and discussion of products, services or content, which is used for subsequent keyword extraction and sentiment analysis processing.

[0074] In a feasible implementation, user information may include comments posted by users on social platforms, such as user descriptions of their experience with a product or service, functional evaluations, satisfaction feedback, and other textual information. This information typically contains users' actual usage experiences and emotional tendencies.

[0075] In another feasible implementation, user information may include feedback information submitted by users through customer service channels, such as suggestions, complaints, and inquiries provided by users through online customer service, telephone consultation, suggestion boxes, etc. This information can directly reflect the problems encountered by users during use and the improvement needs;

[0076] In another feasible implementation, user information may include relevant discussion content posted by users on question-and-answer platforms, forums, and other channels, such as users' opinions on specific topics, experience sharing, and user experience. Such user information is usually highly subjective and emotional.

[0077] It should be noted that in the process of obtaining user information, the system strictly follows the principle of user authorization, only processes information that has been explicitly agreed to by the user or applied for through legal channels, and takes necessary desensitizing measures to ensure that user privacy is fully protected. At the same time, it provides users with corresponding data usage authorization options and withdrawal mechanisms.

[0078] In an embodiment of the present application, a corresponding operation entry can be provided for the user to choose to agree or reject the automated decision result. That is, before the above-mentioned operation S220 generates at least one keyword pair based on the user information, an instruction to agree or reject the keyword pair generation can be obtained from the user through the corresponding operation entry. If the user agrees to generate the keyword pair, at least one keyword pair is generated based on the user information, and step S220 is executed. If the user rejects the keyword pair generation, the expert decision process is entered.

[0079] In the above operation S220, the first vocabulary refers to a word unit in the user information that represents a specific thing, concept or theme. In the embodiment of the present application, it can be understood as the core object or topic entity involved in the user evaluation or description, which is used to determine the specific target or discussion scope of the user's concern; exemplarily, the first vocabulary includes but is not limited to entity vocabulary such as product name, functional module, service type, operation process, application scenario, etc.

[0080] Similarly, the second vocabulary refers to a descriptive word unit in the user information that represents a property, state or characteristic. In the embodiment of the present application, it can be understood as an attribute vocabulary used by the user to evaluate, modify or describe the thing represented by the first vocabulary, which is used to reflect the user's subjective feelings or objective judgment of a specific object; exemplarily, the second vocabulary includes but is not limited to attribute vocabulary such as quality evaluation, speed description, effect judgment, experience feeling, and satisfaction level.

[0081] Furthermore, the co-occurrence relationship between the first word and the second word refers to the semantic association phenomenon that appears simultaneously in the same language environment or text fragment. In the embodiment of the present application, it can be understood as a modification relationship, description relationship or evaluation relationship formed by the two words in the user expression, which is used to establish semantic connections and dependency relationships between words; based on the co-occurrence relationship, the system can identify the semantic correlation between the first word and the second word, and then combine the first word and the second word with the co-occurrence relationship to form a keyword pair.

[0082] For example, when a user expresses "the interface design is beautiful", "interface design" as the first word and "beautiful" as the second word appear together in the same sentence, forming a co-occurrence relationship.

[0083] Furthermore, a keyword pair refers to a vocabulary combination unit composed based on a co-occurrence relationship. In the embodiment of the present application, it can be understood as the smallest semantic unit that can fully express the user's evaluation or description of a specific object, and is used to accurately capture the core ideas and emotional tendencies in user feedback.

[0084] For example, keyword pairs may be expressed in the form of "service attitude - enthusiastic", "response speed - quick", "operation process - complicated", etc. Each keyword pair includes the specific aspects that users are concerned about and their corresponding evaluation attributes.

[0085] In a feasible implementation, the system analyzes the sentence structure in the user information to identify a first word that describes a specific thing and a second word that expresses attribute characteristics. When the two words appear in the same text paragraph or sentence, it is determined that they have a co-occurrence relationship, and then the first word and the second word are combined to generate a keyword pair. For example, "functional operation" and "convenience" are extracted from "This functional operation is very convenient" to form a keyword pair.

[0086] In another feasible embodiment, the system calculates the association strength between the first word and the second word based on the frequency of occurrence and position relationship of the words in the user information. When the association strength exceeds a preset threshold, the two are considered to have a co-occurrence relationship, and the importance of the keyword pair is determined according to the level of the association strength, thereby generating multiple keyword pairs with different importance levels.

[0087] It should be noted that in the process of generating keyword pairs, the system will perform necessary preprocessing on user information, including but not limited to removing irrelevant symbols, unifying format standards, filtering noise data, etc., to ensure that the extracted first and second words have clear semantic meanings. At the same time, the system supports the configuration of the number of keyword pairs to meet the analysis needs in different application scenarios.

[0088] In operation S230, the sentiment attribute refers to the emotional tendency and emotional color characteristics carried by the keyword pair. In the present embodiment, it can be understood as a quantitative identification of the subjective attitude and emotional response expressed by the user through the keyword pair, which is used to identify and distinguish positive comments, negative opinions, or neutral descriptions in user feedback. Exemplarily, the sentiment attribute includes but is not limited to sentiment classification labels such as positive emotion, negative emotion, and neutral emotion, as well as the corresponding sentiment intensity values.

[0089] In a feasible implementation, the system processes each keyword pair through a sentiment analysis algorithm, calculates the sentiment tendency value of each keyword pair, and classifies the sentiment attributes of the keyword pairs according to a preset sentiment threshold range, for example, labeling keyword pairs with sentiment values ​​higher than the positive threshold as positive emotions, and labeling keyword pairs with sentiment values ​​lower than the negative threshold as negative emotions.

[0090] In another feasible implementation, the system evaluates the sentiment intensity of the first and second words in a keyword pair based on a pre-trained sentiment dictionary and semantic analysis model, and then calculates the overall sentiment attribute of the keyword pair by combining the sentiment contributions of the two words, thereby achieving accurate sentiment labeling of the keyword pair.

[0091] It should be noted that in the process of sentiment attribute labeling, the system will take into account the contextual information and cultural background differences expressed by users, and adopt a multi-dimensional sentiment analysis method to ensure the accuracy and reliability of the labeling results. At the same time, it supports the flexible configuration of the sentiment attribute classification system to adapt to the specific needs of different fields and application scenarios.

[0092] In operation S240, the target text refers to the summary text content that carries a specific emotional tendency and is generated based on keyword pairs with emotional attributes. In the embodiment of the present application, it can be understood as a summary expression that can centrally reflect the user's emotional attitude and core views, and is used to intuitively present the main emotional orientation and key information points in the user feedback. Exemplarily, the target text includes but is not limited to a user satisfaction summary that reflects a positive emotional orientation, a product problem feedback summary that highlights a negative emotional orientation, a marketing promotion copy that integrates positive emotional elements, a product optimization suggestion summary that emphasizes the need for improvement, a user experience analysis summary that integrates multiple emotional tendencies, and other content summary forms with clear emotional orientation characteristics.

[0093] In a feasible implementation, the system classifies and organizes keyword pairs with emotional attributes according to their emotional polarity, aggregates keyword pairs with the same emotional attributes, and generates corresponding emotion-oriented content summaries based on the aggregated emotional tendencies to ensure that the target text can accurately reflect the set of user opinions under a specific emotional category.

[0094] In another feasible implementation, the system uses a text generation model to perform semantic expansion and content reorganization on keyword pairs with emotional attributes, and automatically constructs a target text with logical coherence and emotional consistency based on the emotional intensity and importance of the keyword pairs, so that the generated content summary maintains both clarity of emotional orientation and good readability.

[0095] By adopting the embodiment of the present application, user information is obtained, and then a keyword pair including a first word and a second word is generated based on the user information, wherein the keyword pair has a co-occurrence relationship, capturing the core semantic connection in the user expression. By labeling the keyword pairs with emotional attributes, the method can accurately identify the emotional tendency of user feedback, and then generate a target text based on the keyword pairs with emotional attributes. The generated target text presents a content summary with emotional orientation, so that the user's real needs and emotional reactions can be grasped intuitively. Compared with the existing technology, the embodiment of the present application not only automatically extracts the focus of user attention, but also enhances the emotional orientation of the content summary through emotional attribute analysis, solving the problem of low efficiency of user information mining and utilization in the existing technology, thereby providing enterprises with efficient use of user feedback for product optimization and precision marketing.

[0096] Figure 3 The flowchart of a text generation method according to another embodiment provided in the embodiment of the present application is schematically shown.

[0097] like Figure 3 As shown, based on the above embodiment, as an optional embodiment, operation S220 may further include the following operations:

[0098] Operation S310: pre-processing the user information to obtain a plurality of words;

[0099] Operation S320: performing part-of-speech tagging on the plurality of words to obtain a plurality of first words and a plurality of second words, wherein the part-of-speech of the first words is noun and the part-of-speech of the second words is adjective;

[0100] Operation S330: generating a graph based on the plurality of first words and the plurality of second words;

[0101] In operation S340 , at least one keyword pair is determined based on a co-occurrence relationship between the first word and the second word in the graph.

[0102] In operation S310, the preprocessing process involves operations such as text cleaning, format unification, and language unit segmentation of user information. The system decomposes continuous text content into independent vocabulary units through a word segmentation algorithm, and removes punctuation marks, special characters, stop words and other noise information that is meaningless to semantic analysis.

[0103] In operation S320, natural language processing technology can be used to analyze the grammatical properties of each word, focusing on identifying noun words and adjective words. Words with the noun part of speech are classified as first words, and words with the adjective part of speech are classified as second words. This part-of-speech-based classification method can effectively distinguish between main words representing specific things or concepts and modifying words representing attributes or characteristics, providing a structured vocabulary organization for the subsequent construction of keyword pairs with clear semantic relationships, ensuring that the generated keyword pairs can accurately reflect the user's evaluation relationship of specific objects.

[0104] In operation S330, the first and second words can be used as graph vertices. By analyzing the spatial positional relationship and semantic relevance of these words in the original user information, edges are established between the associated vertices to form a complete vocabulary relationship graph. The graph construction process fully considers the co-occurrence frequency, distance relationship, and semantic relevance of words in the text, and uses the graph's topological structure to preserve and express multi-dimensional relationship information between words. This graph-based representation method can more comprehensively capture the semantic dependencies between words than linear text analysis methods in related technologies.

[0105] In operation S340, the connection strength, co-occurrence frequency, and semantic relevance between the first and second words in the graph are analyzed to identify noun-adjective combinations that have a close modifying or evaluative relationship in the user's expression. This co-occurrence-based keyword pairing method can automatically discover the core topics of user interest and their corresponding emotional attitudes, and the generated keyword pairs not only maintain the semantic integrity of the original user information.

[0106] By adopting the embodiments of the present application, keyword pairs with clear semantic structures can be automatically extracted from unstructured user information, thereby improving the accuracy and completeness of key information extraction. Compared with keyword extraction methods in related technologies, the embodiments of the present application can not only identify the key content of user attention, but also simultaneously capture the user's evaluation attitude. The generated keyword pairs have stronger semantic expression ability and emotional orientation, providing high-quality feature input for subsequent sentiment analysis and target text generation, thereby ensuring that the entire text generation process can accurately reflect the user's real needs and emotional tendencies.

[0107] Figure 4 A schematic diagram of a vocabulary co-occurrence relationship graph structure provided according to an embodiment of the present application is shown schematically.

[0108] like Figure 4 As shown, based on the above embodiment, as an optional embodiment, the vertex of the graph is the first word or the second word, the edge of the graph represents the co-occurrence relationship between the two vertices, and the co-occurrence relationship represents the frequency of the two vertices appearing in the same preset window.

[0109] Specifically, in order to accurately quantify and express the strength of semantic association between words, the embodiment of the present application adopts a co-occurrence frequency analysis method based on a preset window to construct a word relationship graph. Figure 4 A typical word co-occurrence relationship graph is shown, where v1, v2, v3, v4, v5, and v6 represent the first or second word extracted from user information, respectively. These vertices are connected by directed edges to form a network structure. The weight values ​​on the edges, such as w31, w23, w41, w43, w53, w64, and w65, represent the strength of the co-occurrence relationship between the corresponding vertices.

[0110] Specifically, the system first sets a preset window size parameter, which determines the range of vocabulary to be considered simultaneously during the text analysis process, and is usually defined in units of the number of words or character length. When the system identifies multiple first and second words in the user information, it will perform a sliding scan of the text according to the size of the preset window and count the number of times each pair of words co-occurs in the same window. For example, if the first word "service" and the second word "convenience" frequently co-occur in multiple preset windows, the system will establish an edge connection between the vertices representing the two words and determine the weight value of the edge based on their co-occurrence frequency.

[0111] This co-occurrence analysis method based on a preset window effectively captures local semantic connections between words. Compared to full-text co-occurrence statistics, this method focuses more on the close relationships between words in a local context, allowing it to more accurately identify word combinations with direct modifying or evaluative relationships. By setting an appropriate window size, the system can avoid noise interference caused by overly broad association analysis while ensuring that important semantic connections are not missed.

[0112] The weight value of the edge in the graph directly reflects the importance and association strength of the corresponding word pair in the user's expression, such as Figure 4 As shown, different weight values, such as w31 and w23, represent differences in the co-occurrence frequencies of different word pairs. This quantitative association strength information provides an important reference for the subsequent determination of keyword pairs. The system can prioritize word combinations with high co-occurrence frequencies as keyword pairs, ensuring that the extracted keyword pairs accurately reflect the core topics and sentiments of users.

[0113] By adopting the embodiments of the present application, the vocabulary co-occurrence relationship map constructed by the system can not only comprehensively preserve the complex association information between words, but also achieve accurate quantification of the association strength through the preset window and frequency statistics method.

[0114] Figure 5 The flowchart of a text generation method according to another embodiment provided in the embodiment of the present application is schematically shown.

[0115] like Figure 5 As shown, based on the above embodiment, as an optional embodiment, operation S340 may further include the following operations:

[0116] Operation S510, calculating the score of each vertex in the graph;

[0117] Operation S520: sorting the plurality of first words and the plurality of second words according to the score of each vertex to obtain a sorting result;

[0118] Operation S530: determining a preset number of keyword pairs based on the ranking result, wherein the score of a keyword pair is the sum of the scores of the first word and the second word.

[0119] In operation S510, a graph-ranking algorithm can be used to evaluate the importance of each vertex in the graph. By iteratively calculating the weight distribution of each vertex, the influence of each vertex in the entire lexical network is quantified. Because the importance of different words in user information varies, simple word frequency statistics cannot accurately reflect the core position of a word in the semantic network. Therefore, a graph-ranking algorithm is needed to comprehensively consider the local connection strength and global network position of a word to calculate a more accurate importance score.

[0120] Specifically, the system analyzes the in-degree and out-degree of each vertex, as well as the weight distribution of the connecting edges, and uses a concept similar to web page ranking to score vocabulary nodes. The specific calculation process can consider the connection density of the vertex in the graph, the importance propagation of adjacent nodes, and the contribution of edge weights. After multiple rounds of iterative calculation until convergence, the corresponding importance score is obtained for each first and second vocabulary.

[0121] For example, the following formula can be used for calculation:

[0122]

[0123] Where, Represents a vertex score; Represents a set of points to vertices; Indicated by The set of vertices pointed to, Indicates from arrive The edge weight of Indicates the damping coefficient, which can generally be set to 0.85.

[0124] In operation S520, the system sorts all first and second terms based on the importance scores calculated for each vertex, generating an ordered list reflecting the importance of each term. The sorting process not only considers the absolute scores of individual terms, but also considers the stability and breadth of association of terms in different semantic contexts, ensuring that first terms with higher importance are preferentially matched with corresponding high-scoring second terms.

[0125] In operation S530 , the system determines the comprehensive importance of the keyword pair by summing the scores based on the ranking results, and evaluates the overall value of the keyword pair by adding the individual scores of the first word and the second word.

[0126] By adopting the embodiment of the present application, the system can automatically identify the most representative vocabulary combinations from a complex vocabulary co-occurrence network. Compared with the traditional keyword extraction method based on frequency statistics, this embodiment fully considers the global importance and local correlation strength of vocabulary in the semantic network through the graph sorting algorithm. The generated keyword pairs not only have high semantic quality, but also can accurately reflect the key topics and emotional tendencies of users. The keyword pair determination mechanism based on score summation ensures a balanced combination of topic vocabulary and attribute vocabulary, avoiding the semantic bias that may be caused by single-dimensional evaluation, thereby providing high-quality feature input for subsequent sentiment analysis and target text generation, significantly improving the accuracy and efficiency of the entire text generation process.

[0127] Figure 6 The flowchart of a text generation method according to another embodiment provided in the embodiment of the present application is schematically shown.

[0128] like Figure 6 As shown, based on the above embodiment, as an optional embodiment, operation S230 may further include the following operations:

[0129] Operation S610: Calculate the sentiment value of each keyword pair, where the sentiment value of the keyword pair is within a preset interval, and the preset interval includes at least a first interval and a second interval;

[0130] Operation S620 , determining the emotional attribute of the keyword pair whose emotional value is in the first interval as negative emotion;

[0131] In operation S630 , the emotional attribute of the keyword pair whose emotional value is in the second interval is determined to be positive emotion.

[0132] In operation S610, the sentiment value refers to a numerical sentiment intensity index obtained by quantitatively evaluating the keyword pair through a sentiment analysis algorithm. In the embodiment of the present application, it can be understood as a calculation result reflecting the degree of emotional tendency expressed by the user through a specific vocabulary combination, and is used to objectively measure the subjective emotional color carried by the keyword pair.

[0133] Specifically, a pre-trained sentiment analysis model can be used to process each keyword pair. By comprehensively analyzing the semantic features, sentiment polarity, and the strength of the sentiment expression of the first and second words in a specific context, a sentiment value within a preset range is calculated. The preset range is based on the statistical analysis results of a large amount of user expression data. Typically, a standardized numerical range is used to ensure that the sentiment strength of different types of keyword pairs is comparable, with the first range corresponding to the numerical range of negative sentiment and the second range corresponding to the numerical range of positive sentiment.

[0134] In operation S620, the sentiment value calculated based on the keyword pair is compared with the numerical range of the first interval. If the sentiment value falls within the first interval, the sentiment attribute of the keyword pair is marked as negative. When determining negative sentiment, not only the sentiment polarity of individual words is considered, but also the overall sentiment tendency of the word combination in a specific context is comprehensively analyzed to ensure accurate identification of negative user feedback.

[0135] In operation S630, keyword pairs with sentiment values ​​in the second interval may be labeled as positive. These keyword pairs typically reflect user satisfaction, approval, and positive evaluation of a product or service. Through precise interval division and sentiment value comparison, the system can effectively distinguish different degrees of positive sentiment expression, accurately identifying and classifying everything from mild approval to strong praise.

[0136] By adopting the embodiments of the present application, automatic and accurate labeling of emotional attributes of keywords is achieved, and subjective emotional expressions are converted into objective numerical classification results. The accuracy and consistency of emotion recognition are improved by setting preset intervals and quantifying the emotional values.

[0137] Figure 7 A target text generation architecture diagram based on a generative model provided according to an embodiment of the present application is schematically shown.

[0138] like Figure 7 As shown, based on the above embodiment, as an optional embodiment, each keyword pair with emotional attributes can also be input into the generative model to obtain the target text output by the generative model.

[0139] In this embodiment, the generative model refers to a neural network model that is built based on deep learning technology and can automatically generate text content. In this embodiment of the application, it can be understood as a text generation system that receives keyword pairs with emotional attributes as input and outputs target text with emotional orientation, which is used to convert structured keyword pair information into natural and fluent text expression. Figure 7 As shown on the left, the generative model adopts a multi-layer neural network architecture, including three main parts: embedding layer, training layer and output layer. The embedding layer is responsible for converting the input keyword pairs into vector representations. The training layer contains multiple decoder units for deep feature learning and semantic understanding. The output layer is responsible for generating the final predicted text.

[0140] Specifically, the system feeds the keyword pairs annotated with sentiment attributes as input data into the embedding layer of the generative model for vectorization processing. The first and second words in the keyword pairs and the corresponding sentiment attribute information are converted into high-dimensional numerical vector representations. In the training layer, multiple decoders are processed hierarchically in sequence. Each decoder is as follows: Figure 7 The detailed structure on the right shows key components, including a multi-head attention mechanism, normalization, and fully connected layers. These components work together to achieve deep semantic analysis and feature extraction of input vectors. The multi-head attention mechanism captures complex relationships within keyword pairs and between keyword pairs. Normalization ensures the stability and convergence of model training. The fully connected layers are responsible for integrating the extracted feature information.

[0141] After processing through multiple layers of decoders, the system generates a prediction result at the output layer. This prediction result is the target text generated based on the input keyword pairs. The generated target text not only maintains a natural and fluent grammatical structure, but also accurately reflects the sentiment and semantic information conveyed by the input keyword pairs, achieving an effective conversion from structured data to natural language text. During the generation process, the model comprehensively considers the sentiment orientation of all input keyword pairs to ensure that the output target text has consistent sentiment and logical coherence.

[0142] By adopting the embodiments of this application, automated text generation is achieved, converting keyword pairs with emotional attributes into natural language text with emotional orientation. The generative model used in the embodiments of this application has stronger semantic understanding capabilities and text generation flexibility, and can generate target texts with diverse styles and accurate content based on different keyword pair combinations.

[0143] Based on the above embodiment, as an optional embodiment, the above text generation method also includes the following operations: sending the target text to the review end to obtain the review opinion fed back by the review end; when the review opinion of the target text is not passed, using the target text as a negative sample to train the generative model.

[0144] In this embodiment, the audit end refers to the audit system or auditor that performs quality assessment and compliance checks on the target text output by the generative model. In the embodiment of this application, it can be understood as a text quality control module with professional judgment ability, which is used to ensure that the generated target text meets the preset quality standards and application requirements. The system automatically sends the target text output by the generative model to the audit end for evaluation. The audit end analyzes multiple dimensions such as the grammatical correctness, content accuracy, emotional consistency, and expression fluency of the target text, and makes a comprehensive judgment on the text quality and provides feedback on the corresponding audit opinions. The audit opinions usually include information such as pass, fail, and specific modification suggestions.

[0145] Specifically, after the reviewer evaluates the target text, the system receives and processes the reviewer's feedback. The reviewer's feedback is obtained using a standardized data exchange format, ensuring that the system can accurately interpret the review results and trigger the appropriate subsequent processing flow. During the evaluation process, the reviewer focuses on whether the target text accurately reflects the sentiment of the input keyword pairs, whether the generated content is logically coherent, and whether the textual expression meets the requirements of the specific application scenario. By establishing a systematic review mechanism, the output quality of the target text can be effectively controlled, preventing unqualified content from negatively impacting subsequent applications.

[0146] When the target text receives a rejection, the system marks it, along with the corresponding input keyword pair, as a negative sample and feeds this negative sample data into the generative model for incremental training. Through reverse learning from negative samples, the system adjusts the internal parameters and weight distribution of the generative model, enabling the model to avoid producing the same type of unqualified output when processing similar inputs. This negative sample-based training mechanism employs the principle of contrastive learning, explicitly informing the model which generated results are unacceptable, thereby guiding the model toward correct generation optimization.

[0147] During negative sample training, the system maintains the fundamental structure of the existing model parameters and only makes local adjustments to the feature weights associated with the negative samples. This ensures that the model learns to avoid errors without compromising its existing ability to generate correct results. The training algorithm analyzes the specific types of issues in the negative samples, such as sentiment deviations, grammatical errors, and logical confusion, and adopts appropriate parameter adjustment strategies for each type of issue. Through continuous negative sample learning and model iteration, the output quality of the generative model will gradually improve, and the approval rate will also increase accordingly.

[0148] By adopting the embodiments of this application, the system establishes a complete closed-loop mechanism for quality control and model optimization. Through professional evaluation by the review end and reverse training with negative samples, it achieves continuous improvement and performance enhancement of the generative model. Not only does this improve the output quality of the target text, but it also establishes an adaptive model optimization system, enabling the system to continuously adjust and improve the text generation effect according to actual application needs, thus providing a reliable technical guarantee for high-quality automated text generation.

[0149] Based on the above text generation method, this application also provides a text generation device. Figure 8 The device is described in detail.

[0150] Figure 8 The structural block diagram of the text generation device according to an embodiment of the present application is schematically shown.

[0151] like Figure 8 As shown, the text generation device 800 of this embodiment includes an acquisition module 810 , a determination module 820 , a marking module 830 and a generation module 840 .

[0152] The acquisition module 810 is used to acquire user information. In one embodiment, the acquisition module 810 can be used to perform the operation S210 described above, which will not be described in detail here.

[0153] Determination module 820 is configured to generate at least one keyword pair based on the user information; the keyword pair includes at least a first word and a second word; and the first word and the second word have a co-occurrence relationship. In one embodiment, determination module 820 can be configured to perform operation S220 described above, which will not be further described here.

[0154] The tagging module 830 is used to tag each of the keyword pairs to obtain keyword pairs with sentiment attributes. In one embodiment, the tagging module 830 can be used to perform the operation S230 described above, which will not be repeated here.

[0155] The generating module 840 is used to generate a target text based on each of the keyword pairs with sentiment attributes, and the target text is used to present a content summary with sentiment orientation. In one embodiment, the generating module 840 can be used to perform the operation S240 described above, which will not be repeated here.

[0156] According to an embodiment of the present application, the acquisition module 810 is also used to preprocess the user information to obtain multiple words; perform part-of-speech tagging on the multiple words to obtain multiple first words and multiple second words, the part of speech of the first words is noun, and the part of speech of the second words is adjective; generate a graph based on the multiple first words and the multiple second words; and determine at least one keyword pair based on the co-occurrence relationship between the first word and the second word in the graph.

[0157] According to an embodiment of the present application, the vertex of the graph is the first word or the second word, the edge of the graph represents the co-occurrence relationship between the two vertices, and the co-occurrence relationship represents the frequency of the two vertices appearing in the same preset window.

[0158] According to an embodiment of the present application, the acquisition module 810 is also used to calculate the score of each of the vertices in the graph; sort the multiple first words and the multiple second words according to the score of each of the vertices to obtain a sorting result; and determine a preset number of keyword pairs based on the sorting result, wherein the score of the keyword pair is the sum of the scores of the first word and the second word.

[0159] According to an embodiment of the present application, the labeling module 830 is also used to calculate the sentiment value of each of the keyword pairs, and the sentiment value of the keyword pair is within a preset interval, and the preset interval includes at least a first interval and a second interval; the sentiment attribute of the keyword pair whose sentiment value is within the first interval is determined to be a negative emotion; and the sentiment attribute of the keyword pair whose sentiment value is within the second interval is determined to be a positive emotion.

[0160] According to an embodiment of the present application, the generation module 840 is further configured to input each of the keyword pairs having sentiment attributes into a generative model to obtain a target text output by the generative model.

[0161] According to an embodiment of the present application, the generation module 840 is also used to send the target text to the review end to obtain the review opinion fed back by the review end; when the review opinion of the target text is not passed, the target text is used as a negative sample to train the generative model.

[0162] According to embodiments of the present application, any multiple modules among the acquisition module 810, determination module 820, annotation module 830, and generation module 840 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the acquisition module 810, determination module 820, annotation module 830, and generation module 840 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the acquisition module 810, determination module 820, annotation module 830, and generation module 840 may be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.

[0163] Figure 9 A block diagram of an electronic device suitable for implementing a text generation method according to an embodiment of the present application is schematically shown.

[0164] like Figure 9As shown, an electronic device 900 according to an embodiment of the present application includes a processor 901, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 902 or programs loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.

[0165] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in the one or more memories.

[0166] According to an embodiment of the present application, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may also include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed into storage section 908 as needed.

[0167] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.

[0168] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.

[0169] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to cause the computer system to implement the text generation method provided in the embodiments of the present application.

[0170] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the processor 901 executes the computer program. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0171] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0172] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0173] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0174] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0175] It will be understood by those skilled in the art that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.

Claims

1. A text generation method, characterized in that: include: Get user information; generating at least one keyword pair based on the user information; the keyword pair includes at least a first word and a second word; and the first word and the second word have a co-occurrence relationship; Marking each of the keyword pairs to obtain keyword pairs with sentiment attributes; A target text is generated based on each of the keyword pairs with sentiment attributes, and the target text is used to present a content summary with sentiment orientation.

2. The method according to claim 1, characterized in that Generating at least one keyword pair based on the user information includes: Preprocessing the user information to obtain multiple words; Performing part-of-speech tagging on the plurality of words to obtain a plurality of first words and a plurality of second words, wherein the part of speech of the first words is noun and the part of speech of the second words is adjective; generating a graph based on the plurality of first vocabularies and the plurality of second vocabularies; At least one keyword pair is determined based on a co-occurrence relationship between a first word and a second word in the graph.

3. The method according to claim 2, characterized in that The vertices of the graph are the first vocabulary or the second vocabulary, and the edges of the graph represent the co-occurrence relationship between two vertices, and the co-occurrence relationship represents the frequency of the two vertices appearing in the same preset window.

4. The method according to claim 3, wherein determining at least one keyword pair based on the co-occurrence relationship between the first word and the second word in the graph comprises: Calculating a score for each vertex in the graph; sorting the plurality of first words and the plurality of second words according to the scores of the vertices to obtain a sorting result; A preset number of keyword pairs are determined based on the ranking results, wherein the score of the keyword pair is the sum of the scores of the first word and the second word.

5. The method according to claim 1, wherein The tagging of each keyword pair to obtain a keyword pair with sentiment attributes includes: Calculating the sentiment value of each keyword pair, where the sentiment value of each keyword pair is within a preset interval, and the preset interval includes at least a first interval and a second interval; Determine the sentiment attribute of the keyword pair whose sentiment value is in the first interval as negative sentiment; The emotional attribute of the keyword pair whose emotional value is in the second interval is determined to be positive emotion.

6. The method according to claim 1, characterized in that Generating a target text based on each of the keyword pairs having sentiment attributes includes: Each keyword pair with sentiment attributes is input into a generative model to obtain a target text output by the generative model.

7. The method according to claim 6, characterized in that The method further comprises: Send the target text to the review end and obtain the review opinion fed back by the review end; When the review opinion of the target text is not passed, the target text is used as a negative sample to train the generative model.

8. A text generation device, characterized in that: The device comprises: Acquisition module, used to obtain user information; A determination module, configured to generate at least one keyword pair based on the user information; the keyword pair includes at least a first word and a second word; the first word and the second word have a co-occurrence relationship; A tagging module, configured to tag each of the keyword pairs to obtain keyword pairs with sentiment attributes; A generating module is used to generate a target text based on each of the keyword pairs with emotional attributes, wherein the target text is used to present a content summary with emotional orientation.

9. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.