Method and system for generating document, computing device, and medium
By extracting and enhancing prompt words, the problem that existing LLM copy generation is difficult to meet diverse needs is solved, the copy quality and interpretability are improved, and more efficient knowledge utilization and real-timeness are achieved.
Patent Information
- Application Number
- PCT/CN2024/122719
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-23
- Filing Date
- 2024-09-30
- Publication Date
- 2025-05-30
AI Technical Summary
The existing short video copy generation method based on the large language model (LLM) is difficult to meet the diverse needs of users, and LLM cannot remember long-tail knowledge, knowledge is easily outdated, and output is difficult to interpret and verify.
By receiving the prompt words input by the user, extracting the first keyword, and using a vector representation to retrieve the associated enhancement information and the second keyword from the vector index database, the enhanced prompt words are generated, and finally provided to the language model to generate copy.
The quality of generated copywriting is improved, the diverse needs of users are met, and the high real-time information in the existing knowledge base is used to avoid some of the defects of LLM itself, which enhances the interpretability and verification of the output.
Smart Images

Figure CN2024122719_30052025_PF_FP_ABST
Abstract
Description
Method, system, computing device and medium for generating copy
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application number 202311579037X, filed on November 23, 2023, and entitled “Methods, systems, computing devices and media for generating copywriting”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present disclosure relates to the field of information processing technology, and more particularly, to a method, system, computing device, computer-readable storage medium, and computer program product for generating a document. Background Art
[0004] In the short video copywriting scenario, the Large Language Model (LLM), due to its advantage in parameter scale, can quickly generate copywriting that meets user requirements based on prompts with a small amount of training data or even no training data, greatly reducing the copywriting cost of short videos, especially oral short videos.
[0005] The current mainstream LLM-based short video copywriting process involves users providing specific prompts based on their video's theme and style, and then inputting them into the LLM. The LLM then returns a video copy that meets the requirements within the constraints of the prompts. However, due to the limitations of the LLM's capabilities, the copy generated in this way may not meet the diverse needs of users.
[0006] Summary of the Invention
[0007] In view of this, the present disclosure provides a method, system, computing device, computer-readable storage medium, and computer program product for generating copy.
[0008] According to a first aspect of the present disclosure, a method for generating copy is provided, comprising: receiving a prompt word input by a user; obtaining a first keyword from the prompt word; using a vector representation of the prompt word, retrieving enhanced information associated with the prompt word and a second keyword associated with the enhanced information from a vector index database; generating an enhanced prompt word using the enhanced information based on a comparison of the first keyword and the second keyword; and providing the enhanced prompt word to a language model to generate copy.
[0009] According to a second aspect of the present disclosure, a system for generating copy is provided, comprising: a prompt word receiving unit configured to receive a prompt word input by a user; a keyword extraction unit configured to obtain a first keyword from the prompt word; an enhanced information acquisition unit configured to use a vector representation of the prompt word to retrieve enhanced information associated with the prompt word and a second keyword associated with the enhanced information from a vector index database; a prompt word enhancement triggering unit configured to use the enhanced information to generate an enhanced prompt word based on a comparison between the first keyword and the second keyword; and a copy generation unit configured to provide the enhanced prompt word to a language model to generate copy.
[0010] According to a third aspect of the present disclosure, a computing device is provided, comprising: at least one processing unit; and at least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the computing device to execute the method as described in the first aspect of the present disclosure.
[0011] According to a fourth aspect of the present disclosure, a non-transitory computer storage medium is provided, comprising machine-executable instructions, which, when executed by a device, cause the device to perform the method according to the first aspect of the present disclosure.
[0012] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising machine-executable instructions, which, when executed by a device, cause the device to perform the method according to the first aspect of the present disclosure.
[0013] It should be understood that the summary of the invention is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The above and other objects, features and advantages of the embodiments of the present disclosure will become more readily understood through the following detailed description with reference to the accompanying drawings, in which several embodiments of the present disclosure are illustrated by way of example and not limitation, in which:
[0015] FIG1 illustrates a block diagram of a computing device capable of implementing various embodiments of the present disclosure;
[0016] FIG2 shows a schematic block diagram of a framework of a copywriting generator according to an embodiment of the present disclosure;
[0017] FIG3 shows a flow chart of a method for generating a copy according to an embodiment of the present disclosure;
[0018] FIG4 shows a schematic diagram of a prompt word enhancement trigger module according to an embodiment of the present disclosure;
[0019] FIG5 shows a schematic block diagram of a framework of a copywriting generator based on creative intent categories according to an embodiment of the present disclosure;
[0020] FIG6A shows a schematic diagram of an initial text input page for generating a copy according to an embodiment of the present disclosure;
[0021] FIG6B shows a schematic diagram of an input page of the intelligent copywriting system for generating a copy according to an embodiment of the present disclosure;
[0022] FIG6C is a schematic diagram showing an output result of the intelligent copywriting method for generating a copy according to an embodiment of the present disclosure; and
[0023] FIG7 shows a schematic block diagram of an apparatus for generating a document according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] The concepts of the present disclosure will now be described with reference to the various exemplary embodiments shown in the accompanying drawings. It should be understood that the description of these embodiments is merely to enable those skilled in the art to better understand and further implement the present disclosure, and is not intended to limit the scope of the present disclosure in any way. It should be noted that similar or identical reference numerals may be used in the figures where possible, and similar or identical reference numerals may represent similar or identical elements. It will be understood by those skilled in the art from the description below that alternative embodiments of the structures and / or methods described herein may be adopted without departing from the principles and concepts of the present disclosure described.
[0025] In the context of this disclosure, the term "including" and its various variations can be understood as open-ended terms, meaning "including but not limited to," the term "based on" can be understood as "based, at least in part, on," the term "one embodiment" can be understood as "at least one embodiment," and the term "another embodiment" can be understood as "at least one other embodiment." Other terms that may appear but are not mentioned here should not be interpreted or limited in a manner that is inconsistent with the concepts underlying the embodiments of this disclosure, unless explicitly stated.
[0026] Large Language Models (LLMs) can quickly generate content based on user-entered prompts, even with minimal or no training data. This significantly reduces the cost of creating short video content, offering significant advantages in this context. Currently, the primary method for users to generate short video content using LLMs is to input prompts based on the video's theme and style, and the LLM will then return a video copy that meets the requirements. However, this approach has some issues.
[0027] First, LLMs cannot memorize all knowledge, especially long-tail knowledge. In machine learning, long-tail knowledge refers to knowledge or features that appear less frequently in a dataset but still have a significant impact on model training and generalization. This knowledge often comes from the long-tail distribution of a dataset, where a minority class has a large number of samples while the majority class has a small number of samples. Due to limitations in training data and existing learning methods, LLMs are not very receptive to long-tail knowledge.
[0028] Second, LLM knowledge is easily outdated and difficult to update. LLM training data often comes from past corpora, which may have changed or become no longer relevant. Furthermore, language and culture evolve over time, which can also cause LLM knowledge to become outdated. To address this, some researchers have fine-tuned LLMs, updating only some of the model's parameters rather than retraining the entire model. However, this approach results in a low and slow model acceptance rate, and even risks losing the original knowledge.
[0029] Third, LLM outputs are difficult to interpret and verify. This is because LLMs are black-box models, preventing direct access to the model's internal computational processes and decision-making mechanisms. Model performance can only be observed through inputs and outputs. Furthermore, the final output may be subject to artifacts such as hallucinations.
[0030] To solve or alleviate the above-mentioned problems and / or other potential problems, an embodiment of the present disclosure proposes a method for generating copy. This method uses the vector representation of the prompt word input by the user to retrieve enhanced information that matches the vector representation in the existing knowledge base, and uses the enhanced information to enhance the prompt word input by the user, and then inputs it into the language model, thereby generating higher-quality copy that meets the user's needs. In this way, it is possible to utilize high-real-time information related to the prompt word input by the user in the existing knowledge base, enhance the prompt word, and then input it into the language model, thereby avoiding some defects of the language model itself, thereby improving the quality of the output copy.
[0031] The following describes the basic principles and implementations of the present disclosure with reference to the accompanying drawings. It should be understood that the exemplary embodiments provided are only intended to enable those skilled in the art to better understand and implement the embodiments of the present disclosure, and are not intended to limit the scope of the present disclosure in any way.
[0032] FIG1 illustrates a block diagram of a computing device 100 capable of implementing various embodiments of the present disclosure. It should be understood that the computing device 100 illustrated in FIG1 is merely exemplary and should not be construed as limiting the functionality and scope of the implementations described herein. As shown in FIG1 , the components of the computing device 100 may include, but are not limited to, one or more processors or processing units 110, a memory 120, a storage device 130, one or more communication units 140, one or more input devices 150, and one or more output devices 160.
[0033] In some implementations, the computing device 100 can be implemented as various user terminals or service terminals with computing capabilities. The service terminal can be a server, a large computing device, etc. provided by various service providers. The user terminal is such as a mobile terminal, a fixed terminal, or a portable terminal of any type, including a mobile phone, a site, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device, or any combination thereof, including accessories and peripherals of these devices, or any combination thereof. It is also foreseeable that the computing device 100 can support any type of interface for the user (such as a "wearable" circuit, etc.).
[0034] Processing unit 110 may be a real or virtual processor and is capable of performing various processes according to a program stored in memory 120. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to increase the parallel processing capabilities of computing device 100. Processing unit 110 may also be referred to as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor, a controller, or a microcontroller.
[0035] The computing device 100 typically includes a plurality of computer storage media. Such media can be any available media accessible to the computing device 100, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 120 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The memory 120 can include a copy generator 122 implemented as a program module, and the copy generator 122 can be configured as a program module to perform the copy generation functions described herein. The copy generator 122 can be accessed and executed by the processing unit 110 to implement the corresponding functions.
[0036] The storage device 130 may be a removable or non-removable medium and may include machine-readable media that can be used to store information and / or data and can be accessed within the computing device 100. The computing device 100 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG1 , a magnetic disk drive for reading from or writing to a removable, non-volatile magnetic disk and an optical disk drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces.
[0037] The communication unit 140 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the computing device 100 can be implemented as a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the computing device 100 can operate in a networked environment using logical connections to one or more other servers, personal computers (PCs), or another general network node.
[0038] Input device 150 may be one or more of various input devices, such as a mouse, keyboard, trackball, touch screen, voice input device, etc. Output device 160 may be one or more output devices, such as a display, speaker, printer, etc. Computing device 100 may also communicate with one or more external devices (not shown) via communication unit 140 as needed, such as storage devices, display devices, etc., with one or more devices that allow a user to interact with computing device 100, or with any device that allows computing device 100 to communicate with one or more other computing devices (e.g., a network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0039] In some implementations, in addition to being integrated on a single device, some or all of the various components of computing device 100 may be configured in the form of a cloud computing architecture. In a cloud computing architecture, these components may be remotely located and work together to implement the functionality described herein. In some implementations, cloud computing provides computing, software, data access, and storage services that do not require the end user to be aware of the physical location or configuration of the systems or hardware providing these services. In various implementations, cloud computing provides services over a wide area network (such as the Internet) using appropriate protocols. For example, a cloud computing provider provides applications over a wide area network, and these applications can be accessed through a web browser or any other computing component. The software or components of the cloud computing architecture and the corresponding data may be stored on servers at remote locations. Computing resources in a cloud computing environment may be consolidated at remote data center locations or they may be dispersed. Cloud computing infrastructure can provide services through shared data centers, even though they appear to be a single access point for users. Therefore, the components and functionality described herein can be provided from a service provider at a remote location using a cloud computing architecture. Alternatively, they can be provided from traditional servers, or they can be installed directly or otherwise on the client device.
[0040] The computing device 100 can generate copy according to various implementations of the present disclosure. As shown in Figure 1, the computing device 100 can receive the input prompt word 170 through the input device 150. The prompt word 170 can be a user's description of the desired short video copy. Alternatively, the computing device 100 can also read the prompt word 170 from the storage device 130 or receive the prompt word 170 from other devices (for example, mobile phones, tablets, personal computers, etc.) from the communication device 140. The computing device 100 can transmit the prompt word 170 to the copy generator 122. The copy generator 122 generates a corresponding target copy 180 based on the prompt word 170. The target copy 180 can meet the requirements described by the user in the prompt word 170.
[0041] For example, prompt 170 represents the text to be processed, which can be in various languages, such as English and Chinese. Prompt 170 can be any user's description of a desired copywriting requirement. Requirements may include, but are not limited to, celebrity introductions, scriptwriting, or seeking solutions. For example, an exemplary prompt 170 is the user-entered text "Introducing Li Bai." Accordingly, the target copywriting 180 generated based on prompt 170 includes an introduction to the Tang Dynasty poet Li Bai. Even if prompt 170 represents other descriptions of requirements, target copywriting 180 can still meet the user's description of the desired copywriting requirement contained in prompt 170, and is not limited to the specific description of the input requirements.
[0042] The technical solution described above is only for illustration and does not limit the present invention. In order to more clearly explain the principle of the above solution, the process of generating the target text 180 according to the prompt word 170 will be described in more detail with reference to FIG. 2 .
[0043] FIG2 shows a schematic block diagram of the framework of a copy generator 200 according to an embodiment of the present disclosure. Copy generator 200 is an example implementation of copy generator 122 of FIG1 . It should be noted that the copy generator 200 shown in FIG2 is merely illustrative and can be implemented using different systems or frameworks. For example, some modules can be omitted or modified, and the system is not limited to the framework shown in FIG2 .
[0044] As shown in FIG2 , a copywriting generator 200 can receive a prompt word 170 input by a user. The prompt word 170 can represent the user's desired description of the copywriting to be generated, such as a sentence or a paragraph. In some embodiments, the copywriting generator 200 can use a named entity recognition (NER) model 201 to extract keywords 202 from the input prompt word 170. The extracted keywords may include the names of one or more entities. The keywords 202 can be used for subsequent comparison to determine whether the input prompt word 170 needs to be enhanced.
[0045] The named entity recognition (NER) model is a natural language processing (NLP) model used to identify specific entities in text, such as place names and organizational names. NER models can also be used to extract keywords from text. For example, for the text "Company A's headquarters is in Nanjing," the NER model might label "Company A" as the organizational name and "Nanjing" as the place name, thus identifying "Company A" and "Nanjing" as keywords for the text.
[0046] The NER model is obtained through offline training. This offline training process can use supervised learning methods, using large amounts of labeled data to train the model so that it can accurately identify various types of entities during testing. During training, the model learns features of the input text, such as word form, word order, and grammatical structure, to identify entities in the text.
[0047] As shown in the figure, the input prompt word 170 can also be provided to the vector model 203 and generate a prompt word vector 204. The vector model 203 can convert the input text or sentence into a vector form. During the conversion process, the text is regarded as a sequence consisting of a series of words or terms and mapped to a vector in the vector space.
[0048] In some embodiments, the vector model may be a BGE-Large model. This model can map any text into a low-dimensional dense vector for tasks such as retrieval, classification, clustering, or semantic matching. The BGE-Large model uses a bidirectional gated recurrent unit (BGRU) as the network structure, combining forward and backward information flow, enabling the model to better capture the semantic information of the text. In addition, the model uses a multi-layer gated recurrent unit (Multi-layer BGRU) to deepen the network structure to increase the ability to capture the deep semantics of the text.
[0049] As shown in the figure, the generated prompt word vector 204 can be provided to the vector index database 205. The vector index database is a special database that is mainly used to process and search vector data. In the vector index database, data is represented as high-dimensional vectors, and these vectors are stored in an index for fast retrieval.
[0050] The distance between two vectors can be used to measure the similarity between two vectors. Optionally, vector similarity can be obtained by calculating the cosine distance, Euclidean distance, or vector inner product between vectors. In some embodiments, the vector index database 205 can be an elastic index K-nearest neighbor database, which uses a K-nearest neighbor algorithm to determine an enhanced prompt word vector in response to the cosine similarity with the prompt word vector 204 exceeding a threshold.
[0051] In some embodiments, the enhanced prompt word vector can be combined with the associated document information for enhancement and keywords related to the information to form a text entry in the vector index database 205, so that the enhanced information 207 related to the input prompt word 170 and the keywords 206 about the enhanced information 207 can be obtained by retrieving the enhanced prompt word vector.
[0052] The text entries in the vector index database 205 are added during the offline training process, so that the vector index database 205 can be frequently updated. Optionally, the text entries stored in a vector index database 205 can belong to the same category (e.g., organization name, place name, etc.), so that each vector index database 205 has highly real-time vertical category (also known as theme or topic) information.
[0053] As shown in the figure, keyword 202 from prompt word 170 and keyword 206 from vector index database 205 can be provided to prompt word enhancement trigger module 208. In prompt word enhancement trigger module 208, the similarity between keyword 202 and keyword 206 can be compared. In response to the similarity exceeding a threshold, enhanced information 207 and prompt word 170 are combined to generate enhanced prompt word 209. In some embodiments, enhanced prompt word 209 includes two parts: background knowledge and problem description. Enhanced prompt word 209 is generated by concatenating enhanced information 207 as the background knowledge part and prompt word 170 as the problem description part into a single text.
[0054] As shown, enhanced prompt words 209 can be provided to LLM 210. LLM 210 utilizes its ability to quickly generate a text that meets the requirements based on the prompt words to obtain target text 180. Enhanced prompt words 209 have higher text quality than input prompt words 170, thus avoiding some of the inherent shortcomings of LLM 210 and improving the quality of the generated target text 180.
[0055] Figure 3 illustrates a flow diagram of a method 300 for generating a document according to some embodiments of the present disclosure. In some embodiments, method 300 may be implemented by, for example, the computing device 100 shown in Figure 1 . More specifically, method 300 may be implemented by the document generator 122 of Figure 1 . It should be understood that method 300 may include additional actions not shown and / or may omit actions shown, and the scope of the present disclosure is not limited in this respect. For ease of explanation, method 300 will be described with reference to the framework shown in Figure 2 .
[0056] As shown in Figure 3, at block 310, computing device 100 receives a prompt word input by a user. In some embodiments, computing device 100 may be a local device, such as a mobile phone, and the user may enter the prompt word in an application program (APP). In some embodiments, computing device 100 may be a server on the Internet, such as a cloud server, that receives the prompt word transmitted from the user's mobile phone via the network.
[0057] As shown in FIG3 , at block 320 , computing device 100 obtains first keyword 202 from prompt word 170 . In some embodiments, referring to FIG2 , computing device 100 uses named entity recognition (NER) model 201 to obtain first keyword 202 from input prompt word 170 . For structured prompt word 170 , the corresponding keyword field is directly used as first keyword 202 . For unstructured prompt word 170 , NER model 201 is used to extract entities with specific meaning or strong referentiality (e.g., organization name, place name, date and time, proper noun, etc.) from prompt word 170 to obtain first keyword 202 .
[0058] Returning to FIG. 3 , at block 330 , computing device 100 uses the vector representation of prompt word 170 to retrieve, from vector index database 205 , enhancement information 207 associated with prompt word 170 and a second keyword 206 associated with enhancement information 207. Enhancement information 207 is textual information stored in vector index database 205 , and second keyword 206 is used to perform a similarity comparison with first keyword 202 to determine whether enhancement processing is required for input prompt word 170.
[0059] 2 , the computing device 100 may use the vector model 203 to obtain a prompt word vector 204 from the prompt word 170, and then retrieve an enhanced prompt word vector similar to the prompt word vector 204 from the vector index database 205. Based on the enhanced prompt word vector, the computing device 100 may determine corresponding enhanced information 207 and a second keyword 206.
[0060] As described above, vector index database 205 can be a text library, in which each text entry has an associated vector representation, keywords, and text information for enhancement. The vector representation is used as an index for the corresponding text entry. Thus, as long as an enhanced prompt word vector similar to prompt word vector 204 is retrieved, the enhanced information 207 and second keyword 206 for the same entry can be obtained.
[0061] In some embodiments, vector similarity can be obtained by calculating the cosine distance, Euclidean distance, or vector inner product between vectors. In some embodiments, vector index database 205 is an elastic index K-nearest neighbor database, which uses a K-nearest neighbor algorithm to determine an enhanced prompt word vector in response to the cosine similarity with the prompt word vector 204 exceeding a threshold.
[0062] Returning to Figure 3 , at block 340 , computing device 100 uses enhancement information 207 to generate enhanced prompt words 209 based on a comparison of first keyword 202 and second keyword 206 . To more clearly explain the principles of the above solution, the process of generating enhanced prompt words 209 will be described in more detail below with reference to Figure 4 . Method 300 enhances user-entered prompt words by searching an existing knowledge base, then inputs the enhanced prompt words into a language model to generate target copy, thereby providing users with higher-quality copy.
[0063] FIG4 illustrates a schematic diagram of a prompt word enhancement trigger module according to an embodiment of the present disclosure. In some embodiments, as shown in FIG4 , the computing device 100 may use a word embedding encoder 401 to convert the first keyword 202 into a first embedding vector 402 and the second keyword 206 into a second embedding vector 403 , and then use a vector similarity calculation module 404 to compare and obtain a vector similarity 405 between the first embedding vector 402 and the second embedding vector 403 . If the vector similarity 405 exceeds a preset threshold, it indicates that the prompt word 170 needs to be enhanced, thereby obtaining an enhanced prompt word 209 .
[0064] In some embodiments, enhanced prompt word 209 includes background knowledge and a problem description. Enhanced prompt word 209 is generated by concatenating enhanced information 207 as the background knowledge portion and prompt word 170 as the problem description portion into a single text. Optionally, word embedding encoder 401 can employ a transformer-based bidirectional encoder representation technique.
[0065] Returning to Figure 3, at block 350, computing device 100 provides enhanced prompt word 209 to a language model to generate text. In some embodiments, as shown in Figure 2, the language model is LLM 210. By leveraging LLM 210's ability to quickly generate text that meets the requirements based on prompt words, target text 180 can be obtained. Using enhanced prompt word 209 as input, compared to directly inputting prompt word 170, can leverage the high-quality, real-time information related to topics in the existing knowledge base related to prompt word 170, while avoiding the inherent shortcomings of LLM 210. Consequently, the quality of the resulting text is improved, making it less susceptible to issues such as hallucinations.
[0066] FIG5 shows a schematic block diagram of the framework of a copy generator based on creative intent categories according to an embodiment of the present disclosure. In some embodiments, in order to further utilize high-real-time information and improve the efficiency of copy enhancement, it is also possible to select the vector index database 205 of the corresponding category to retrieve enhancement information 207 based on the creative intent category. The text entries in the vector index database 205 are added during the offline training process. The text entries stored in a vector index database 205 belong to the same category, so that each vector index database 205 has highly real-time vertical category information.
[0067] In some embodiments, as shown in FIG5 , each vector index database 205 - 1 , 205 - 2 . . . 205 - n in the database 205 corresponds to a creative intent category, which may be celebrity introduction, script writing, solution seeking, and the like. Optionally, the creative intent category 502 of the prompt word 170 is obtained by pre-inputting the prompt word 170 into the creative intent classification model 330 , and based on the creative intent category 502 , the corresponding vector index database is determined, which contains a large number of pre-input text entries of the same category. By introducing the creative intent classification model 501 , each vector index database 205 can store only text entries of the same category, and after the computing device 100 obtains the prompt word vector 204 , it can efficiently perform retrieval operations.
[0068] Figures 6A-6C illustrate the user interaction process of generating a copy based on prompt words according to some embodiments of the present disclosure. Among them, Figure 6A shows a schematic diagram of an initial text input page 600A for generating a copy according to an embodiment of the present disclosure. In the initial text input page 600A, a copy input box 601, an intelligent copy writing control 602, and a generate video control 603 are included. In some embodiments, the user can enter a complete video copy in the copy input box 601, and then click on the generate video control 603 to generate a video with the copy, or do not enter text in the prompt word input box 601, directly click on the intelligent copy writing control 602, and enter the input page 600B of the intelligent copy writing.
[0069] 6B shows a schematic diagram of an input page 600B for intelligent copywriting for generating copywriting according to an embodiment of the present disclosure. In the input page 600B of intelligent copywriting, a prompt word input box 604, a prompt word upload control 606 and a keyboard 606 are included. In some embodiments, the user can enter the required description of the target copywriting, i.e., the prompt word, in the prompt word input box 604 through the keyboard 606, and then click the prompt word upload control 606. According to an embodiment of the present disclosure, the input prompt word can be enhanced and input into the LLM to generate a high-quality target copywriting. Thus, the output result 600C page of the intelligent copywriting is entered.
[0070] Figure 6C shows a schematic diagram of the output result 600C of the intelligent copywriting function for generating a copy, according to an embodiment of the present disclosure. The output result 600C of the intelligent copywriting function includes a copywriting input box 601, an intelligent copywriting control 602, and a generate video control 603. The copywriting input box 601 includes the target copy corresponding to the prompt word entered in the intelligent copywriting input page 600B. The user can click the generate video control 603 to generate a video including the target copy.
[0071] The above reference figures 2 to 6C describe an exemplary embodiment of the present disclosure. Compared with the existing copy generation scheme, the prompt word enhancement scheme of the present disclosure can use the high real-time information related to the prompt word input by the user in the existing knowledge base as enhancement information, and then input the prompt word into the language model after enhancement, so as to improve the quality of the output copy. In some implementations, it is also possible to judge whether the input prompt word needs to be enhanced by comparing the similarity between the keywords from the prompt word and the keywords of the enhancement information, thereby improving the reliability of the enhancement operation. In some implementations, it is also possible to retrieve the knowledge base information of the corresponding category based on the creative intention category of the input prompt word, thereby improving the retrieval efficiency.
[0072] FIG7 shows a schematic block diagram of an apparatus 700 for generating text according to an embodiment of the present disclosure. Apparatus 700 can be implemented, for example, in the text generator 122 of the computing device 100 shown in FIG1 . As shown in FIG7 , apparatus 700 includes a prompt word receiving unit 710 , a keyword extraction unit 720 , an enhanced information acquisition unit 730 , a prompt word enhancement unit 740 , and a text generation unit 750 .
[0073] In some embodiments, the prompt word receiving unit 710 is configured to receive a prompt word input by a user; the keyword extraction unit 720 is configured to obtain a first keyword from the prompt word; the enhanced information acquisition unit 730 is configured to use the vector representation of the prompt word to retrieve enhanced information associated with the prompt word and a second keyword associated with the enhanced information from a vector index database; the prompt word enhancement triggering unit 740 is configured to use the enhanced information to generate an enhanced prompt word based on a comparison of the first keyword and the second keyword; and the copywriting generation unit 750 is configured to provide the enhanced prompt word to a language model to generate copywriting.
[0074] It should be noted that more actions or steps shown in Figures 2 to 6 can be implemented by the device 700 shown in Figure 7. For example, the device 700 may include more modules or units to implement the actions or steps described above, or some units or modules shown in Figure 7 may be further configured to implement the actions or steps described above. This will not be repeated here.
[0075] In some embodiments, the methods and processes described above may be implemented as a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0076] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: 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 static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0077] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0078] The computer program instructions for performing the disclosed operation can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data or source code or the object code written in any combination of one or more programming languages, wherein the programming languages include object-oriented programming languages, and conventional procedural programming languages.Computer-readable program instructions can be performed completely on the user's computer, partially on the user's computer, performed as an independent software package, partly on the user's computer and partly on a remote computer, or performed completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer by any type of network-including local area network (LAN) or wide area network (WAN), or can be connected to an external computer (such as utilizing an Internet service provider to connect by the Internet). In certain embodiments, by utilizing the state information of computer-readable program instructions to carry out personalized customization electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLA), this electronic circuit can perform computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0079] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0080] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0081] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes 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 and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart, can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0082] While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technical improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for generating copywriting, comprising: Receive prompt words input by the user; Acquire a first keyword from the prompt word; Retrieving, from a vector index database, enhanced information associated with the cue word and a second keyword associated with the enhanced information using the vector representation of the cue word; generating an enhanced prompt word using the enhanced information based on a comparison of the first keyword and the second keyword; as well as The enhanced prompt words are provided to a language model to generate text.
2. The method of claim 1, wherein using the enhanced information to generate an enhanced prompt word comprises: Obtain a first embedding vector from the first keyword and a second embedding vector from the second keyword using a word embedding encoder; Determining a similarity between the first embedding vector and the second embedding vector; and In response to the similarity exceeding a threshold, the enhanced cue word is generated by combining the cue word and the enhanced information.
3. The method according to claim 1, wherein obtaining the first keyword from the input prompt word comprises: The first keyword is obtained from the prompt word using a named entity recognition model.
4. The method according to claim 1, wherein retrieving the enhanced information related to the prompt word and the second keyword related to the enhanced information from the vector index database comprises: Using a vector model to obtain a prompt word vector from the prompt word; Retrieving, in the vector index database, an enhanced prompt word vector similar to the prompt word vector; as well as Based on the enhanced prompt word vector, a corresponding text entry is determined as the enhanced information and the second keyword.
5. The method according to claim 4, wherein the vector index database comprises a text library, each text entry in the text library has an associated vector representation and a keyword, the vector representation being used as an index of the corresponding text entry in the vector index database.
6. The method according to claim 4, wherein the vector index database comprises an elastic index K nearest neighbor database, and retrieving an enhanced prompt word vector similar to the prompt word vector comprises: Based on the K nearest neighbor algorithm, in response to the cosine similarity with the prompt word vector exceeding a threshold, the enhanced prompt word vector is determined.
7. The method according to claim 1, further comprising: Determine the creative intent category from the prompt word using a creative intent classification model; as well as Based on the creative intent category, the vector index database to be searched of the same category is determined.
8. A system for generating copywriting, comprising: A prompt word receiving unit, configured to receive a prompt word input by a user; A keyword extraction unit, configured to obtain a first keyword from the prompt word; an enhanced information acquisition unit, configured to retrieve enhanced information associated with the prompt word and a second keyword associated with the enhanced information from a vector index database using the vector representation of the prompt word; a prompt word enhancement trigger unit, configured to generate an enhanced prompt word using the enhancement information based on a comparison between the first keyword and the second keyword; as well as The text generation unit is configured to provide the enhanced prompt words to a language model to generate text.
9. The system according to claim 8, wherein the prompt word enhancement trigger unit is further configured to: Obtain a first embedding vector from the first keyword and a second embedding vector from the second keyword using a word embedding encoder; Determining a similarity between the first embedding vector and the second embedding vector; and In response to the similarity exceeding a threshold, the enhanced cue word is generated by combining the cue word and the enhanced information.
10. The system according to claim 8, wherein the keyword extraction unit is further configured to: The first keyword is obtained from the prompt word using a named entity recognition model.
11. The system according to claim 8, wherein the enhanced information acquisition unit is further configured to: Using a vector model to obtain a prompt word vector from the prompt word; Retrieving an enhanced prompt word vector similar to the prompt word vector in the vector index database; and Based on the enhanced prompt word vector, the corresponding enhanced information and the second keyword are determined.
12. The system according to claim 11, wherein the vector index database includes a text library, each text entry in the text library has an associated vector representation, a keyword, and text information for enhancement, the vector representation being used as an index for the corresponding text entry.
13. The system according to claim 11, wherein the vector index database comprises an elastic index K nearest neighbor database, and the enhanced information acquisition unit is further configured to: Based on the K nearest neighbor algorithm, in response to the cosine similarity with the prompt word vector exceeding a threshold, the enhanced prompt word vector is determined.
14. The system according to claim 8, further comprising a database determination unit, wherein the database determination unit is configured to: Determining a creative intent category from the prompt word using a creative intent classification model; and Based on the creative intent category, the vector index database to be searched is determined.
15. A computing device comprising: at least one processing unit; at least one memory coupled to the at least one processing unit and storing Instructions for execution by the at least one processing unit, which, when executed by the at least one processing unit, cause the computing device to perform the method of any one of claims 1 to 7.
16. A non-transitory computer storage medium comprising machine executable instructions which, when executed by a device, cause the device to perform the method of any one of claims 1 to 7.
17. A computer program product comprising machine executable instructions which, when executed by a device, cause the device to perform the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Prompt word recommendation method and device, storage medium and processor
CN110543484A
Cboth information processing method and device, electronic equipment and computer readable medium
CN114970470A
Marketing text creation method, device and equipment
CN115409025A
Data conversion method, data conversion system, electronic equipment and readable storage medium
CN116701437A
Method and system for adding knowledge into knowledge base
CN117010493A
Cited By
On-duty document generation system and method based on large reasoning model
CN120654689A
A system and method for generating a duty officer document based on a large reasoning model
CN120654689B
Intelligent document question and answer method, device and equipment and storage medium
CN120706544A
Prompt word logic configuration method based on context semantic enhancement
CN120725027A
Method and device for generating reasoning result, storage medium and electronic equipment
CN120930810A