Cboth content generation method and device, computer equipment and storage medium
By combining semantic analysis, knowledge graph reasoning and format control rules, we guide the large language model to generate copy content, solving the limitations of creativity, personalized customization and platform adaptability in the existing technology, and achieving more efficient and flexible automatic copy content generation.
Patent Information
- Application Number
- CN202411538765.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The existing automatic copy content generation technology has limitations in creative play, personalized customization and adapting to the style needs of different communication platforms.
Through semantic analysis, knowledge graph reasoning and format control rules, guide the large language model to generate copywriting content. The specific steps include obtaining keywords in the requirement document, conducting semantic analysis and mapping them into the product knowledge graph, identifying semantic associations through graph reasoning, and generating appropriate copy content in combination with format control rules.
The generated copy content is not only more semantically accurate, but can also adapt to different demand scenarios and communication platforms, improving the personalization, creativity and flexibility of automatic copy content generation.
Smart Images

Figure CN119538877A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a method, device, computer equipment and storage medium for generating copy content. Background Art
[0002] With the rapid advancement and widespread penetration of social media technology, companies are increasingly demanding the implementation of diversified marketing strategies. In order to broaden the customer base and attract more potential customers, companies urgently need to carefully plan various promotional materials, including holiday specials, creative copywriting for promotional activities, and eye-catching product promotional images, in order to stand out in the fierce market competition. Taking insurance products as an example, companies need to customize insurance product copywriting and product promotional images for holiday promotions to accurately convey the advantages of insurance and attract the attention and trust of potential customers.
[0003] The traditional copywriting content creation process relies heavily on the experience and subjective judgment of professionals. Professionals need to carefully plan and organize the copywriting content according to the established goals, content categories and specific needs. This manual processing method has certain limitations in terms of time and resource allocation. In recent years, with the significant breakthroughs in artificial intelligence in text and image generation technology, automatic creation of copywriting and images has become possible, greatly improving the efficiency of creation. However, the current automatic copywriting content generation technology still has certain limitations in terms of creativity, personalized customization, and adapting to the style requirements of different communication platforms. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose a method, device, computer equipment and storage medium for generating copy content, so as to solve the technical problem that the existing automatic copy content generation technology still has certain limitations in terms of creativity, personalized customization and adaptation to the style requirements of different communication platforms.
[0005] In order to solve the above technical problems, the present application embodiment provides a method for generating copy content, which adopts the following technical solution:
[0006] A method for generating copy content, comprising:
[0007] Obtain the requirement document of the content to be generated and read the requirement keywords in the requirement document;
[0008] Perform semantic analysis on demand keywords to obtain keyword semantic representation;
[0009] Obtain the pre-built product knowledge graph and map the keyword semantic representation into the product knowledge graph;
[0010] In the product knowledge graph, based on the keyword semantic representation, the semantic association between the demand keywords and the knowledge nodes of the product knowledge graph is identified through graph reasoning to obtain the semantic association representation;
[0011] Obtain the document format corresponding to the content of the document to be generated from the demand document, and obtain the format control rules matching the document format in the preset format rule engine;
[0012] Based on semantic association representation and format control rules, the pre-trained large language model is guided to generate copy content that matches the demand document.
[0013] Furthermore, the steps of obtaining a pre-built product knowledge graph and mapping the keyword semantic representation to the product knowledge graph specifically include:
[0014] Construct a feature mapping space and create several feature points in the feature mapping space;
[0015] Identify the knowledge nodes of the product knowledge graph, and pair the knowledge nodes of the product knowledge graph with the feature points in the feature mapping space to obtain the knowledge feature pairing results;
[0016] According to the knowledge feature pairing results, the product knowledge graph is imported into the feature mapping space.
[0017] Furthermore, in the product knowledge graph, based on the keyword semantic representation, the semantic association between the demand keyword and the knowledge node of the product knowledge graph is identified through graph reasoning to obtain the semantic association representation, which specifically includes:
[0018] Perform semantic analysis on the knowledge nodes of the product knowledge graph to obtain semantic representation of the knowledge nodes;
[0019] Based on the semantic representation of keywords and knowledge nodes, determine whether there is a semantic association between the demand keywords and knowledge nodes;
[0020] If there is a semantic association between the demand keywords and the knowledge nodes, the semantic association features are extracted and a semantic association representation is generated.
[0021] Furthermore, based on the keyword semantic representation and the knowledge node semantic representation, the step of determining whether there is a semantic association between the demand keyword and the knowledge node specifically includes:
[0022] Calculate the semantic similarity between the semantic representation of keywords and the semantic representation of knowledge nodes;
[0023] Compare the semantic similarity with the preset similarity threshold;
[0024] When the semantic similarity is greater than or equal to the similarity threshold, it is determined that there is a semantic association between the demand keyword and the knowledge node;
[0025] When the semantic similarity is less than the similarity threshold, it is determined that there is no semantic association between the demand keyword and the knowledge node.
[0026] Furthermore, based on the semantic association representation and format control rules, the steps of guiding the pre-trained large language model to generate copy content matching the demand document specifically include:
[0027] Input semantic association representation and format control rules into the pre-trained large language model;
[0028] Traverse the text library of the large language model and identify the target text that matches the semantic association representation;
[0029] Combine the target text according to the format control rules to obtain the copy content that matches the requirement document.
[0030] Furthermore, before the step of guiding the pre-trained large language model to generate copy content matching the requirement document based on the semantic association representation and format control rules, the method further includes:
[0031] Acquire training sample data, wherein the training sample data includes historical copy keywords, historical copy format control rules, and historical copy content;
[0032] Perform semantic analysis on the keywords of historical copywriting to obtain semantic representation of the keywords of historical copywriting;
[0033] Map the semantic representation of historical copywriting keywords to the product knowledge graph;
[0034] In the product knowledge graph, based on the semantic representation of historical copy keywords, the semantic association between historical copy keywords and knowledge nodes of the product knowledge graph is identified through graph reasoning to obtain the historical semantic association representation;
[0035] Inputting the historical semantic association representation and the historical text format control rules into a preset initial large language model, so that the initial large language model learns the historical semantic association representation and the historical text format control rules, and outputs the predicted text content;
[0036] Compare the predicted copy content with the historical copy content to obtain the model prediction error;
[0037] The initial large language model is iteratively updated according to the model prediction error until the model is fitted to obtain a pre-trained large language model.
[0038] Furthermore, after the steps of obtaining the demand document of the content to be generated and reading the demand keywords in the demand document, the method further includes:
[0039] Classify the demand keywords, and group the demand keywords according to the keyword classification results to obtain several keyword groups;
[0040] Assign corresponding keyword group weight to each keyword group;
[0041] The steps of semantically analyzing the demand keywords and obtaining the semantic representation of the keywords include:
[0042] For each demand keyword, identify the keyword group to which the demand keyword belongs, and obtain the keyword group weight corresponding to the demand keyword;
[0043] The semantic analysis of the demand keywords is performed, and the semantic analysis results of the demand keywords are weighted using the corresponding keyword group weights to obtain the keyword semantic representation.
[0044] In order to solve the above technical problems, the present application also provides a copy content generation device, which adopts the following technical solution:
[0045] A copy content generating device, comprising:
[0046] The keyword reading module is used to obtain the demand document of the content to be generated and read the demand keywords in the demand document;
[0047] Semantic analysis module, used to perform semantic analysis on demand keywords and obtain semantic representation of keywords;
[0048] The semantic mapping module is used to obtain the pre-built product knowledge graph and map the keyword semantic representation into the product knowledge graph;
[0049] The semantic association module is used to identify the semantic association between the demand keywords and the knowledge nodes of the product knowledge graph through graph reasoning based on the keyword semantic representation in the product knowledge graph to obtain the semantic association representation;
[0050] A control rule module is used to obtain the copy format corresponding to the copy content to be generated from the demand document, and obtain the format control rules matching the copy format in a preset format rule engine;
[0051] The copywriting generation module is used to guide the pre-trained large language model to generate copywriting content that matches the demand document based on semantic association representation and format control rules.
[0052] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0053] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the copywriting content generation method as described in any one of the above items when executing the computer-readable instructions.
[0054] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0055] A computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the copywriting content generation method as described in any one of the above are implemented.
[0056] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0057] The present application discloses a method, device, computer equipment and storage medium for generating copy content, and belongs to the field of artificial intelligence technology. Aiming at the limitations of existing automatic copy generation technology in terms of creativity, personalized customization and platform adaptability, the present application guides a large language model to generate copy by combining semantic analysis, knowledge graph reasoning and format control rules, so that the generated content is not only more semantically accurate, but also adaptable to different demand scenarios and communication platforms. The introduction of knowledge graphs improves the professionalism and information relevance of copy, and format control rules ensure that the structure and style of the copy meet the requirements of specific platforms. Through these optimizations, more personalized, creative and multi-platform copy can be generated, which improves the practicality and flexibility of automatic generation of copy content. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0059] Figure 1 An exemplary system architecture diagram is shown in which the present application can be applied;
[0060] Figure 2 A flow chart showing an embodiment of a method for generating copy content according to the present application is shown;
[0061] Figure 3 A schematic structural diagram of an embodiment of a copywriting content generating device according to the present application is shown;
[0062] Figure 4A schematic structural diagram of an embodiment of a computer device according to the present application is shown. DETAILED DESCRIPTION
[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0064] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0065] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0066] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0067] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0068] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to a laptop computer 1011, a tablet computer 1012 or a mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.
[0069] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .
[0070] It should be noted that the copy content generation method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the copy content generation device is generally arranged in the server / terminal device.
[0071] It should be understood that Figure 1 The numbers of terminal devices, networks and servers in the embodiment are merely illustrative. The above system may have any number of terminal devices, networks and servers according to implementation requirements.
[0072] Continue to refer Figure 2 , showing a flow chart of an embodiment of a method for generating text content according to the present application. The method for generating text content comprises the following steps:
[0073] S201, obtaining a requirement document of the content to be generated, and reading requirement keywords in the requirement document.
[0074] Specifically, the system first receives the demand document provided by the user. The demand document contains the user's requirements for the content of the copy, usually including key information such as the product to be promoted, the target audience, product features, and promotional highlights. The system will automatically parse the document and extract key demand keywords from it. For example, for insurance products, the demand document will mention keywords such as "medical insurance", "accidental protection", and "long-term benefits". These keywords are the core elements of copy generation because they can directly reflect the characteristics of the product and user needs. Keyword extraction can be automated through natural language processing technology, such as through part-of-speech tagging, word frequency statistics, or named entity recognition, to ensure that the system can identify the core vocabulary required for copy generation.
[0075] S202, performing semantic analysis on the demand keywords to obtain keyword semantic representation.
[0076] Specifically, after extracting keywords, the system performs semantic analysis on these keywords with the goal of understanding the true meaning of the keywords and how the keywords are used in different contexts. This is usually done through word vector technology, such as Word2Vec, BERT and other natural language processing models, which convert keywords into semantic vector representations. In this way, the system can understand the implicit semantic connections between words. For example, for the keyword "medical insurance", the system not only recognizes its surface meaning, but also infers related concepts such as "long-term protection", "beneficiary", "policy" and so on through semantic analysis. Through semantic analysis, the system can accurately capture the meaning of demand keywords in specific fields.
[0077] S203, obtaining a pre-built product knowledge graph, and mapping the keyword semantic representation into the product knowledge graph.
[0078] Specifically, the system obtains and utilizes a pre-built product knowledge graph, which contains structured information about insurance products, such as the characteristics of different types of insurance, the types of risks covered, and the requirements of policyholders. The system establishes a connection between keywords and existing knowledge in the graph by mapping the semantic representation of keywords to relevant nodes in this knowledge graph. For example, the keyword "accidental protection" will be mapped to the node related to "accident insurance" in the graph, and the node is also connected to other information such as "low premium" and "suitable for short-term needs". Through this mapping, the system can understand the specific relationship between each keyword and the insurance product, so that more appropriate content and expression can be selected when generating copy. At the same time, this process effectively enhances the accuracy and industry professionalism of the copy content.
[0079] S204, in the product knowledge graph, based on the keyword semantic representation, the semantic association between the demand keyword and the knowledge nodes of the product knowledge graph is identified through graph reasoning to obtain the semantic association representation.
[0080] Specifically, after completing the mapping of keywords to the knowledge graph, the system uses graph reasoning technology to further explore the deep semantic associations between keywords and knowledge nodes. By analyzing the relationship between nodes in the graph, the system can identify the association between demand keywords and other related concepts or features. For example, for the keyword "life insurance", the reasoning process may reveal the relationship between "life insurance" and concepts such as "beneficiary protection", "cash value" or "long-term investment". These inferred semantic associations provide richer information dimensions for copywriting generation, allowing the system to cover more important features related to insurance products when generating copywriting, ensuring that the copywriting is not only accurate, but also has sufficient persuasiveness and depth.
[0081] S205, obtaining a document format corresponding to the document content to be generated from the demand document, and obtaining a format control rule matching the document format in a preset format rule engine.
[0082] Specifically, the system obtains the copy format information expected by the user based on the description in the requirements document. Different communication platforms or usage scenarios usually have different format requirements. For example, the copy on social media may be relatively concise, while the copy placed on the website requires more detailed instructions. Taking insurance products as an example, if the goal is to generate a social media advertisement, the format may require concise text, such as a sentence, to highlight the protection advantages and attach a call to action. The system obtains control rules that match the format from the format rule engine. These rules will include paragraph structure, word limit, tone and style, etc. For example, social media ads are required to be within 80 words and use direct and powerful sentences to attract customers. Through these format control rules, the system ensures that the generated copy meets the format and style requirements of the specific platform or scenario in addition to the content.
[0083] S206, based on the semantic association representation and format control rules, guide the pre-trained large language model to generate copy content that matches the demand document.
[0084] Specifically, in the last step, the system uses a pre-trained large language model (such as GPT) to generate the final copy. Based on the semantic association representation obtained earlier, the system ensures that the content of the copy is consistent with the core selling points of the product and the information associated with keywords. At the same time, the format control rules guide the model to maintain a specific structure and style when generating copy. The large language model will combine semantic information with format requirements, and dynamically fill in specific content during the generation process to ensure that the final copy is not only highly matched with the requirements in the demand document, but also expressed naturally and fluently, and close to the needs of the target audience.
[0085] Furthermore, the steps of obtaining a pre-built product knowledge graph and mapping the keyword semantic representation to the product knowledge graph specifically include:
[0086] Construct a feature mapping space and create several feature points in the feature mapping space;
[0087] Identify the knowledge nodes of the product knowledge graph, and pair the knowledge nodes of the product knowledge graph with the feature points in the feature mapping space to obtain the knowledge feature pairing results;
[0088] According to the knowledge feature pairing results, the product knowledge graph is imported into the feature mapping space.
[0089] In this embodiment, the system effectively integrates the relationship between the product knowledge graph and the feature points by constructing a feature mapping space. In this mapping space, first, several feature points are created based on dimensions such as product characteristics and keyword semantic representation. These feature points represent the core elements that need to be paid attention to in copywriting generation. Then, the system identifies the knowledge nodes in the product knowledge graph and pairs these nodes with the feature points in the feature mapping space. The pairing process is implemented by semantic similarity calculation, embedded vector matching, etc., to ensure that the knowledge nodes can be accurately mapped to the most relevant feature points. For example, if the node "life insurance" in the knowledge graph has characteristics such as "guarantee period" and "beneficiary", the system pairs these characteristics to the corresponding feature points in the mapping space, such as "long-term protection" and "family safety". Finally, through the pairing results, the entire product knowledge graph is imported into the feature mapping space. In this way, the feature mapping space not only contains the semantic information of the product, but also associates the specific knowledge graph nodes.
[0090] Through the above steps, the product knowledge graph and feature mapping space are closely integrated, providing more accurate semantics and knowledge associations for copywriting generation. After importing the knowledge graph, the system can understand the product characteristics more comprehensively, thereby generating more targeted and detailed copywriting, improving the accuracy and professionalism of the copywriting.
[0091] Furthermore, in the product knowledge graph, based on the keyword semantic representation, the semantic association between the demand keyword and the knowledge node of the product knowledge graph is identified through graph reasoning to obtain the semantic association representation, which specifically includes:
[0092] Perform semantic analysis on the knowledge nodes of the product knowledge graph to obtain semantic representation of the knowledge nodes;
[0093] Based on the semantic representation of keywords and knowledge nodes, determine whether there is a semantic association between the demand keywords and knowledge nodes;
[0094] If there is a semantic association between the demand keywords and the knowledge nodes, the semantic association features are extracted and a semantic association representation is generated.
[0095] In this embodiment, first, the knowledge nodes of the product knowledge graph are semantically analyzed to generate the semantic representation of the knowledge nodes. This process can be completed by natural language processing (NLP) technology, such as converting knowledge nodes into computable semantic vectors through models such as BERT and Word2Vec. These vectors can represent the semantic features of knowledge nodes. Next, the system calculates the semantic similarity or correlation between the semantic representation of keywords and the semantic representation of knowledge nodes based on the previously acquired semantic representation of keywords and the semantic representation of knowledge nodes. Through this similarity calculation, the system can determine whether there is a semantic association between the demand keywords and the knowledge nodes. If the system detects that there is a semantic association, it further extracts the associated feature information, such as the weight of the association, the type of association, etc. These features are used to generate semantic association representations, providing detailed semantic association information about the demand keywords and product features. The generation of semantic association representations not only includes the direct association between keywords and knowledge nodes, but also may include the implicit semantic connection behind them. This semantic association helps the system to understand the relationship between keywords and product features at a deeper level, ensuring that the generated content can accurately reflect the core selling points and needs of the product.
[0096] Through the above steps, the semantic association analysis between demand keywords and product knowledge nodes is realized, and a detailed semantic association representation is generated. With the help of this association information, the system can generate more targeted and semantically accurate copywriting, ensuring that the copywriting content is more in line with user needs, and improving the accuracy and intelligence level of automatically generated copywriting.
[0097] Furthermore, based on the keyword semantic representation and the knowledge node semantic representation, the step of determining whether there is a semantic association between the demand keyword and the knowledge node specifically includes:
[0098] Calculate the semantic similarity between the semantic representation of keywords and the semantic representation of knowledge nodes;
[0099] Compare the semantic similarity with the preset similarity threshold;
[0100] When the semantic similarity is greater than or equal to the similarity threshold, it is determined that there is a semantic association between the demand keyword and the knowledge node;
[0101] When the semantic similarity is less than the similarity threshold, it is determined that there is no semantic association between the demand keyword and the knowledge node.
[0102] In this embodiment, the system first calculates the semantic similarity between the semantic representation of the demand keyword and the semantic representation of the knowledge node. The similarity calculation usually uses methods such as cosine similarity or Euclidean distance to compare the two semantic vectors to obtain a similarity value between 0 and 1. Then, the system compares the calculated semantic similarity with the preset similarity threshold to determine the correlation between the demand keyword and the knowledge node. If the similarity is greater than or equal to the threshold, the system determines that there is a semantic association between the demand keyword and the knowledge node, which means that the two are semantically significantly correlated and suitable for subsequent copywriting generation processes. On the contrary, if the similarity is lower than the threshold, it is determined that there is no effective semantic association between the two. Through such a similarity judgment mechanism, the system can efficiently screen out knowledge nodes that are highly relevant to the demand keywords, ensuring that the information used when generating copywriting is both accurate and targeted, thereby better meeting the needs of users.
[0103] Through the above steps, the semantic association between demand keywords and knowledge nodes is effectively identified, which improves the accuracy and pertinence of copy generation, thereby enhancing the intelligence level of automatically generated copy.
[0104] Furthermore, based on the semantic association representation and format control rules, the steps of guiding the pre-trained large language model to generate copy content matching the demand document specifically include:
[0105] Input semantic association representation and format control rules into the pre-trained large language model;
[0106] Traverse the text library of the large language model and identify the target text that matches the semantic association representation;
[0107] Combine the target text according to the format control rules to obtain the copy content that matches the requirement document.
[0108] In this embodiment, the system first inputs the generated semantic association representation and format control rules into the pre-trained large language model. The semantic association representation provides detailed information between the demand keywords and the relevant knowledge nodes, while the format control rules ensure that the generated copy meets the specific structural and style requirements. Next, the system traverses the text library of the large language model to identify the target text that matches the semantic association representation. This step aims to find the most relevant sentences or paragraphs through the language patterns and knowledge learned in advance by the model to meet the needs of copy generation. Then, the system combines the identified target texts according to the format control rules to construct the final copy content. Through this combination, the system can ensure that the generated copy is consistent with the demand document in content and meets the prescribed format requirements in form. For example, if the format control rule specifies that the copy should contain question guidance and calls for action, the system will extract the appropriate target text and combine it into a complete copy that conforms to this structure.
[0109] Through the above steps, an effective combination of semantic information and format requirements is achieved, and the generated copy content is more targeted and structured, which significantly improves the quality and accuracy of automated copy generation.
[0110] Furthermore, before the step of guiding the pre-trained large language model to generate copy content matching the requirement document based on the semantic association representation and format control rules, the method further includes:
[0111] Acquire training sample data, wherein the training sample data includes historical copy keywords, historical copy format control rules, and historical copy content;
[0112] Perform semantic analysis on the keywords of historical copywriting to obtain semantic representation of the keywords of historical copywriting;
[0113] Map the semantic representation of historical copywriting keywords to the product knowledge graph;
[0114] In the product knowledge graph, based on the semantic representation of historical copy keywords, the semantic association between historical copy keywords and knowledge nodes of the product knowledge graph is identified through graph reasoning to obtain the historical semantic association representation;
[0115] Inputting the historical semantic association representation and the historical text format control rules into a preset initial large language model, so that the initial large language model learns the historical semantic association representation and the historical text format control rules, and outputs the predicted text content;
[0116] Compare the predicted copy content with the historical copy content to obtain the model prediction error;
[0117] The initial large language model is iteratively updated according to the model prediction error until the model is fitted to obtain a pre-trained large language model.
[0118] In this embodiment, first, the system obtains training sample data containing historical copy keywords, format control rules, and copy content. These data provide rich information about successful copy, which is convenient for the model to learn. Next, the system performs semantic analysis on the historical copy keywords and converts these keywords into semantic vector representations using natural language processing technology. After that, the system maps the semantic representations of these historical copy keywords to the product knowledge graph, establishes the relationship between the keywords and the knowledge nodes, and through graph reasoning, the system identifies the semantic associations between the historical copy keywords and the knowledge nodes, and then generates a historical semantic association representation. This information is then input into the preset initial large language model together with the format control rules of the historical copy so that the model can learn the semantic structure and format specifications in the historical data.
[0119] After learning, the model will generate predicted copy content, and the system will compare this content with historical copy and calculate the model's prediction error. By analyzing the error, the system can identify the shortcomings of the model-generated content and iteratively update the initial large language model. This process continues until the model can effectively fit the historical data, and the generated copy has a high degree of similarity with the historical copy content in terms of semantics and format, thus obtaining a pre-trained large language model that can more accurately generate copy that meets the needs, with greater adaptability and creativity.
[0120] Through the above steps, the large language model is optimized using historical data, enabling it to generate high-quality, structured and creative copy, significantly improving the accuracy and flexibility of copy generation.
[0121] Furthermore, after the steps of obtaining the demand document of the content to be generated and reading the demand keywords in the demand document, the method further includes:
[0122] Classify the demand keywords, and group the demand keywords according to the keyword classification results to obtain several keyword groups;
[0123] Assign a corresponding keyword group weight to each keyword group.
[0124] In this embodiment, the system first classifies the demand keywords in order to better understand their role and importance in the copywriting process. Classification can be based on multiple dimensions such as the semantic characteristics of keywords, usage scenarios, or target audiences. For example, the keyword "life insurance" is classified as "insurance products", while "accidental protection" is classified as "protection type". After classification, the system will group the demand keywords according to the classification results of the keywords and generate several keyword groups. Each keyword group will contain keywords with similar semantics or functions. Next, a corresponding weight is assigned to each keyword group. This weight reflects the importance and priority of the keyword group in the entire copywriting generation. The weight allocation can be based on historical data analysis, the frequency of keyword use, user feedback and other factors to ensure that the system can give priority to those more influential and relevant keyword groups when generating copywriting.
[0125] Through the above steps, the demand keywords are classified and grouped, and weights are assigned to them, which improves the accuracy and relevance of copy generation and makes the generated content more in line with the real needs of users.
[0126] Furthermore, the steps of performing semantic analysis on the demand keywords to obtain the semantic representation of the keywords specifically include:
[0127] For each demand keyword, identify the keyword group to which the demand keyword belongs, and obtain the keyword group weight corresponding to the demand keyword;
[0128] The semantic analysis of the demand keywords is performed, and the semantic analysis results of the demand keywords are weighted using the corresponding keyword group weights to obtain the keyword semantic representation.
[0129] In this embodiment, for each demand keyword, the system first identifies the keyword group to which the keyword belongs and obtains the corresponding keyword group weight. This process ensures that the system understands the relative importance of each keyword in the copywriting generation. Next, the system conducts an in-depth semantic analysis of the demand keywords and converts them into semantic vectors using natural language processing technology. These semantic vectors can capture the contextual information of the keywords and their implicit meanings. Subsequently, the system uses the corresponding keyword group weights to weight the semantic analysis results of the demand keywords to reflect the importance of the keywords in the entire copywriting generation process. For example, if the keyword "life insurance" has a higher weight in its keyword group, its semantic representation will be given a greater weight. Through this weighting process, the final keyword semantic representation can more accurately reflect the role of keywords in the generation of specific copywriting, so that the generated content not only meets the semantic requirements, but also has higher relevance and effectiveness.
[0130] Through the above steps, the semantic analysis of demand keywords and keyword group weights are effectively integrated, providing a more accurate semantic basis for content generation, thereby improving the accuracy and pertinence of copy generation.
[0131] In the above embodiments, the present application discloses a method for generating copy content, which belongs to the field of artificial intelligence technology. This application aims at the limitations of existing automatic copy generation technology in terms of creativity, personalized customization and platform adaptability. By combining semantic analysis, knowledge graph reasoning and format control rules, a large language model is guided to generate copy, so that the generated content is not only more semantically accurate, but also adaptable to different demand scenarios and communication platforms. The introduction of knowledge graphs improves the professionalism and information relevance of the copy, and the format control rules ensure that the structure and style of the copy meet the requirements of specific platforms. Through these optimizations, more personalized, creative and multi-platform style copy can be generated, which improves the practicality and flexibility of automatic generation of copy content.
[0132] In this embodiment, the electronic device (eg, Figure 1 The server shown in the figure) can receive instructions or obtain data through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0133] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned copy content information, the above-mentioned copy content information can also be stored in a blockchain node.
[0134] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0135] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0136] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0137] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0138] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0139] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a copywriting content generation device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0140] like Figure 3 As shown, the copy content generating device 300 described in this embodiment includes:
[0141] The keyword reading module 301 is used to obtain the demand document of the content to be generated and read the demand keywords in the demand document;
[0142] Semantic analysis module 302, used to perform semantic analysis on demand keywords to obtain semantic representation of keywords;
[0143] The semantic mapping module 303 is used to obtain a pre-built product knowledge graph and map the keyword semantic representation into the product knowledge graph;
[0144] A semantic association module 304 is used to identify the semantic association between the demand keywords and the knowledge nodes of the product knowledge graph through graph reasoning based on the keyword semantic representation in the product knowledge graph to obtain a semantic association representation;
[0145] The control rule module 305 is used to obtain the document format corresponding to the content of the document to be generated from the demand document, and obtain the format control rule matching the document format in the preset format rule engine;
[0146] The copywriting generation module 306 is used to guide the pre-trained large language model to generate copywriting content matching the demand document based on semantic association representation and format control rules.
[0147] Furthermore, the semantic mapping module 303 is specifically used for:
[0148] Construct a feature mapping space and create several feature points in the feature mapping space; identify the knowledge nodes of the product knowledge graph and pair the knowledge nodes of the product knowledge graph with the feature points in the feature mapping space to obtain the knowledge feature pairing results; import the product knowledge graph into the feature mapping space based on the knowledge feature pairing results.
[0149] Furthermore, the semantic association module 304 is specifically used for:
[0150] Perform semantic analysis on the knowledge nodes of the product knowledge graph to obtain semantic representation of the knowledge nodes; based on the semantic representation of keywords and the semantic representation of knowledge nodes, determine whether there is a semantic association between the demand keywords and the knowledge nodes; if there is a semantic association between the demand keywords and the knowledge nodes, extract the semantic association features and generate a semantic association representation.
[0151] Furthermore, the semantic association module 304 is further used to:
[0152] Calculate the semantic similarity between the keyword semantic representation and the knowledge node semantic representation; compare the semantic similarity with the preset similarity threshold; when the semantic similarity is greater than or equal to the similarity threshold, determine that there is a semantic association between the demand keyword and the knowledge node; when the semantic similarity is less than the similarity threshold, determine that there is no semantic association between the demand keyword and the knowledge node.
[0153] Furthermore, the copywriting generation module 306 is specifically used for:
[0154] Input the semantic association representation and format control rules into the pre-trained large language model; traverse the text library of the large language model to identify the target text that matches the semantic association representation; combine the target text according to the format control rules to obtain the copy content that matches the requirement document.
[0155] Furthermore, the copy content generating device 300 further includes a large language model training module, which is specifically used for:
[0156] Acquire training sample data, wherein the training sample data includes historical copy keywords, historical copy format control rules and historical copy content; perform semantic analysis on the historical copy keywords to obtain semantic representations of the historical copy keywords; map the semantic representations of the historical copy keywords to the product knowledge graph; in the product knowledge graph, identify the semantic associations between the historical copy keywords and the knowledge nodes of the product knowledge graph through graph reasoning based on the semantic representations of the historical copy keywords to obtain historical semantic association representations; input the historical semantic association representations and the historical copy format control rules into a preset initial large language model, so that the initial large language model learns the historical semantic association representations and the historical copy format control rules, and outputs predicted copy content; compare the predicted copy content with the historical copy content to obtain a model prediction error; iteratively update the initial large language model according to the model prediction error until the model is fitted to obtain a pre-trained large language model.
[0157] Furthermore, the copy content generating device 300 further includes a weight configuration module, and the large weight configuration is specifically used for:
[0158] The demand keywords are classified, and the demand keywords are grouped according to the keyword classification results to obtain several keyword groups; and a corresponding keyword group weight is assigned to each keyword group.
[0159] Furthermore, the semantic analysis module 302 is specifically used for:
[0160] For each demand keyword, identify the keyword group to which the demand keyword belongs, and obtain the keyword group weight corresponding to the demand keyword; perform semantic analysis on the demand keyword, and use the corresponding keyword group weight to weight the semantic analysis result of the demand keyword to obtain the keyword semantic representation.
[0161] In the above embodiment, the present application discloses a copy content generation device, which belongs to the field of artificial intelligence technology. Aiming at the limitations of existing automatic copy generation technology in terms of creativity, personalized customization and platform adaptability, the present application guides a large language model to generate copy by combining semantic analysis, knowledge graph reasoning and format control rules, so that the generated content is not only more semantically accurate, but also adaptable to different demand scenarios and communication platforms. The introduction of knowledge graphs improves the professionalism and information relevance of the copy, and the format control rules ensure that the structure and style of the copy meet the requirements of specific platforms. Through these optimizations, more personalized, creative and multi-platform copy can be generated, which improves the practicality and flexibility of automatic generation of copy content.
[0162] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0163] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 4 with a memory 41, a processor 42, and a network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0164] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0165] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the copywriting content generation method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0166] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the copy content generation method.
[0167] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0168] In the above embodiment, the present application discloses a computer device, which belongs to the field of artificial intelligence technology. In view of the limitations of existing automatic copywriting generation technology in terms of creativity, personalized customization and platform adaptability, the present application guides a large language model to generate copywriting by combining semantic analysis, knowledge graph reasoning and format control rules, so that the generated content is not only more semantically accurate, but also adaptable to different demand scenarios and communication platforms. The introduction of knowledge graphs improves the professionalism and information relevance of copywriting, and format control rules ensure that the structure and style of copywriting meet the requirements of specific platforms. Through these optimizations, more personalized, creative and multi-platform style copywriting can be generated, which improves the practicality and flexibility of automatic generation of copywriting content.
[0169] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the copy content generation method as described above.
[0170] In the above embodiments, the present application discloses a computer-readable storage medium, which belongs to the field of artificial intelligence technology. This application aims at the limitations of existing automatic copywriting generation technology in terms of creativity, personalized customization and platform adaptability. By combining semantic analysis, knowledge graph reasoning and format control rules, a large language model is guided to generate copywriting, so that the generated content is not only more semantically accurate, but also adaptable to different demand scenarios and communication platforms. The introduction of knowledge graphs improves the professionalism and information relevance of copywriting, and format control rules ensure that the structure and style of copywriting meet the requirements of specific platforms. Through these optimizations, more personalized, creative and multi-platform style copywriting can be generated, which improves the practicality and flexibility of automatic generation of copywriting content.
[0171] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0172] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0173] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for generating copy content, characterized in that: include: Obtaining a requirement document for the content to be generated, and reading the requirement keywords in the requirement document; Performing semantic analysis on the demand keywords to obtain keyword semantic representation; Obtain a pre-built product knowledge graph, and map the keyword semantic representation into the product knowledge graph; In the product knowledge graph, based on the keyword semantic representation, the semantic association between the demand keyword and the knowledge node of the product knowledge graph is identified through graph reasoning to obtain a semantic association representation; Acquire a document format corresponding to the document content to be generated from the demand document, and acquire a format control rule matching the document format in a preset format rule engine; Based on the semantic association representation and format control rules, the pre-trained large language model is guided to generate copy content matching the demand document.
2. The method for generating copy content according to claim 1, characterized in that: The step of obtaining a pre-built product knowledge graph and mapping the keyword semantic representation to the product knowledge graph specifically includes: Constructing a feature mapping space, and creating a plurality of feature points in the feature mapping space; Identifying knowledge nodes of the product knowledge graph, and pairing the knowledge nodes of the product knowledge graph with feature points in the feature mapping space to obtain knowledge feature pairing results; According to the knowledge feature pairing result, the product knowledge graph is imported into the feature mapping space.
3. The method for generating copy content according to claim 1, characterized in that: The step of identifying the semantic association between the demand keyword and the knowledge node of the product knowledge graph through graph reasoning based on the keyword semantic representation in the product knowledge graph to obtain the semantic association representation specifically includes: Performing semantic analysis on the knowledge nodes of the product knowledge graph to obtain semantic representation of the knowledge nodes; Based on the keyword semantic representation and the knowledge node semantic representation, determining whether there is a semantic association between the demand keyword and the knowledge node; If there is a semantic association between the demand keyword and the knowledge node, the semantic association feature is extracted and the semantic association representation is generated.
4. The method for generating copy content according to claim 3, characterized in that: The step of judging whether there is a semantic association between the demand keyword and the knowledge node based on the keyword semantic representation and the knowledge node semantic representation specifically includes: Calculating the semantic similarity between the keyword semantic representation and the knowledge node semantic representation; comparing the semantic similarity with a preset similarity threshold; When the semantic similarity is greater than or equal to the similarity threshold, determining that there is a semantic association between the demand keyword and the knowledge node; When the semantic similarity is less than the similarity threshold, it is determined that there is no semantic association between the demand keyword and the knowledge node.
5. The method for generating copy content according to claim 1, characterized in that: The step of guiding the pre-trained large language model to generate text content matching the demand document based on the semantic association representation and format control rules specifically includes: Inputting the semantic association representation and format control rules into the pre-trained large language model; Traversing the text library of the large language model to identify target text matching the semantic association representation; The target text is combined according to the format control rules to obtain the text content matching the requirement document.
6. The method for generating copy content according to claim 5, characterized in that: Before the step of guiding the pre-trained large language model to generate text content matching the demand document based on the semantic association representation and format control rules, the method further includes: Acquire training sample data, wherein the training sample data includes historical copy keywords, historical copy format control rules and historical copy content; Performing semantic analysis on the historical copy keywords to obtain semantic representations of the historical copy keywords; Mapping the historical copy keyword semantic representation into the product knowledge graph; In the product knowledge graph, based on the semantic representation of the historical copy keywords, the semantic association between the historical copy keywords and the knowledge nodes of the product knowledge graph is identified through graph reasoning to obtain a historical semantic association representation; Inputting the historical semantic association representation and the historical text format control rule into a preset initial large language model, so that the initial large language model learns the historical semantic association representation and the historical text format control rule, and outputs predicted text content; Comparing the predicted text content with the historical text content to obtain the model prediction error; The initial large language model is iteratively updated according to the model prediction error until the model is fitted to obtain the pre-trained large language model.
7. The method for generating copy content according to claim 1, characterized in that: After the step of obtaining the demand document of the content to be generated and reading the demand keywords in the demand document, the method further includes: Classifying the demand keywords, and grouping the demand keywords according to the keyword classification results to obtain a plurality of keyword groups; Assigning a corresponding keyword group weight to each of the keyword groups; The step of performing semantic analysis on the demand keywords to obtain semantic representation of the keywords specifically includes: For each of the demand keywords, identify the keyword group to which the demand keyword belongs, and obtain the keyword group weight corresponding to the demand keyword; The demand keywords are semantically analyzed, and the semantic analysis results of the demand keywords are weighted using corresponding keyword group weights to obtain the keyword semantic representation.
8. A copy content generating device, characterized in that: include: A keyword reading module is used to obtain a demand document of the content to be generated and read demand keywords in the demand document; A semantic analysis module, used to perform semantic analysis on the demand keywords to obtain semantic representation of the keywords; A semantic mapping module, used to obtain a pre-built product knowledge graph and map the keyword semantic representation into the product knowledge graph; A semantic association module, used to identify the semantic association between the demand keyword and the knowledge node of the product knowledge graph through graph reasoning based on the keyword semantic representation in the product knowledge graph to obtain a semantic association representation; A control rule module, used to obtain the document format corresponding to the document content to be generated from the demand document, and obtain the format control rule matching the document format in a preset format rule engine; The copywriting generation module is used to guide the pre-trained large language model to generate copywriting content matching the demand document based on the semantic association representation and format control rules.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the method for generating copy content as claimed in any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the method for generating copy content according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Comment generation method and device, electronic equipment and storage medium
CN111428489A
Task automatic decomposition method and system based on context semantics
CN117150046A
Test case generation method and device, computer equipment and storage medium
CN117573549A
Large language model enhanced question and answer generation method
CN118013051A