Document generation method and device based on fund sentences, equipment and medium
Through the document generation method based on golden sentences, using human-computer interaction and golden sentence material library, the shortcomings of traditional document creation tools in generating golden sentences that meet specific industry standards and are infectious, achieving efficient, personalized and creative document creation effects.
Patent Information
- Application Number
- CN202411742611.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional document creation tools are difficult to generate golden sentences that meet specific industry standards, are infectious and targeted, and lack sufficient contextual understanding, resulting in the generated sentences still having a lot of room for improvement in logical coherence, context adaptability and creative expression.
A document generation method based on golden sentences is provided, which displays input content through a human-computer interactive interface, including creation requirements information and golden sentence requirements information, determines the associated golden sentence materials based on the golden sentence material library, and generates a target document based on the user's choice.
Significantly improve creative efficiency, enhance text personalization and creativity, break through traditional paradigms, realize diversified expression, precise language analysis and generation, and is suitable for a variety of text creation scenarios, continuously optimize and learn, reduce human errors, realize resource self-iteration and optimize user experience.
Smart Images

Figure CN119599148A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of AI technology, and in particular to a method, device, equipment and medium for generating documents based on golden sentences. Background Art
[0002] Today, as information floods the world, documents are the core carriers for delivering key information, guiding daily work and decision-making. The quality and efficiency of document writing are directly related to the effective communication of information and the smooth progress of work. Traditional document creation is highly dependent on the author's writing skills, professional knowledge accumulation and rich practical experience. This process is not only time-consuming, but also difficult to ensure that each sentence can accurately convey the intention and be both literary and persuasive. Although there are some writing assistance tools on the market, such as standard templates and vocabulary libraries, most of these tools have limited functions and cannot meet the urgent needs for innovative, concise and context-specific golden sentences in document creation.
[0003] With the rapid development of artificial intelligence technology, especially the breakthrough in the field of natural language processing (NLP), a series of writing assistance tools based on rule engines and statistical models have emerged. They try to analyze text structure and predict language patterns through algorithms to generate text content in an automated or semi-automated manner. However, these traditional NLP methods are unable to cope with complex and changeable document languages, especially in generating sentences that are contagious and targeted and meet specific industry standards. They often lack sufficient contextual understanding capabilities, resulting in the generated sentences conforming to basic grammar, but there is still much room for improvement in logical coherence, contextual adaptability and creative expression. Therefore, exploring more intelligent and efficient document creation assistance technologies, especially the introduction of large model technology, has become the key to improving the quality and efficiency of document creation. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a method, device, equipment and medium for generating a document based on golden sentences, which can improve the efficiency and quality of document creation.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for generating a document based on a golden sentence, the method comprising:
[0007] In response to the input operation, the input content is displayed through the human-computer interaction interface; wherein the input content includes creation demand information and golden sentence demand information;
[0008] In response to a confirmation operation on the input content, based on the golden sentence demand information, at least one golden sentence material associated with the creation demand information is determined from a golden sentence material library;
[0009] In response to a selection operation for a target golden sentence, determining a target golden sentence from the at least one golden sentence material associated with the creation requirement;
[0010] A target document is generated based on the creation requirement information and the target golden sentence.
[0011] In a second aspect, an embodiment of the present application further provides a document generation device based on golden sentences, the device comprising:
[0012] An input module, used to display input content through a human-computer interaction interface in response to an input operation; wherein the input content includes creation demand information and golden sentence demand information;
[0013] A determination module, configured to respond to a confirmation operation on the input content and determine at least one golden sentence material associated with the creation requirement information from a golden sentence material library based on the golden sentence requirement information;
[0014] A selection module is used to respond to a selection operation on a target golden sentence and determine the target golden sentence from the at least one golden sentence material associated with the creation requirement;
[0015] A generation module is used to generate a target document based on the creation requirement information and the target golden sentence.
[0016] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to execute the document generation method based on golden sentences as described in any one of the first aspects.
[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the document generation method based on golden sentences described in any one of the first aspects is executed.
[0018] The embodiments of the present application have the following beneficial effects:
[0019] (1) Significantly improve creative efficiency: With the help of intelligent sentence generation technology, users can quickly generate preliminary manuscripts, greatly shortening the time and effort required for document writing, avoiding long-term manual writing work, and improving overall work efficiency.
[0020] (2) Enhanced text personalization and creativity: Through the AI big model, the system can generate creative and personalized golden sentences to meet the diverse needs of different users and occasions. User feedback and interactive learning mechanisms further enhance the system's customization capabilities, making text creation more in line with user expectations.
[0021] (3) Breaking through traditional paradigms and achieving diversified expressions: AI big models learn various text styles from a huge corpus, avoiding the problems of repetition and single mode in manual creation, bringing new ways of expression to document creation, and improving the diversity and novelty of the text.
[0022] (4) Accurate language analysis and generation: Using natural language processing technology, the system can deeply analyze the text input by the user and generate sentences and golden sentences that are in line with the context and have depth, maintaining the consistency of language style while providing accurate and appropriate text generation.
[0023] (5) Wide range of domain adaptability: The present invention is applicable to various documents, including official documents, academic reports, business proposals, press releases and other text creation scenarios. Its strong adaptability and transfer learning capabilities enable the technology to be effective in multiple fields.
[0024] (6) Continuous optimization and learning: Through the closed-loop mechanism of user feedback and model self-learning, the system can continuously optimize and improve itself. Each interaction is a training and optimization of the system, which improves the output quality.
[0025] (7) Powerful data processing capabilities: Relying on big data processing and analysis capabilities, the system is able to process and analyze huge amounts of official documents and historical data. Intelligent sentence generation is not only based on surface information, but also incorporates actual historical background and context.
[0026] (8) Reducing human errors: By restricting grammatical rules and logical structures, the system can reduce grammatical errors and inappropriate wording in traditional manual document creation, thereby improving the quality and standardization of the text.
[0027] (9) Resource self-iteration: The system can continuously add the latest pragmatic materials, styles, and trends, achieve self-updating and evolution, and maintain the advancement and practicality of the technology.
[0028] (10) Optimizing user experience: Providing an interactive interface enables users to participate in the creation process and adjust parameters in real time to obtain the best results, thereby improving user satisfaction and participation and making the creation process more intuitive and convenient.
[0029] To sum up, the embodiments of the present application have demonstrated great advantages and potential in improving creation efficiency, enhancing text personalization and creativity, optimizing work efficiency and user experience, realizing standardized document creation, and resource self-iteration. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 It is a flowchart of steps S101-S104 provided in an embodiment of the present application;
[0032] Figure 2 It is a flowchart of steps S201-S204 provided in an embodiment of the present application;
[0033] Figure 3 It is a flowchart of steps S301-S302 provided in an embodiment of the present application;
[0034] Figure 4 It is a flowchart of steps S401-S403 provided in an embodiment of the present application;
[0035] Figure 5 It is a flowchart of steps S501-S502 provided in an embodiment of the present application;
[0036] Figure 6 It is a flowchart of steps S601-S602 provided in an embodiment of the present application;
[0037] Figure 7 It is a structural schematic diagram of a document generation device based on golden sentences provided in an embodiment of the present application;
[0038] Figure 8 It is a schematic diagram of the composition structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0039] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0040] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0041] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0042] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0043] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0045] See also Figure 1 , Figure 1is a flowchart of steps S101-S104 of the method for generating a document based on a golden sentence provided in an embodiment of the present application, which will be combined with Figure 1 Steps S101-S104 are shown for explanation.
[0046] In step S101, in response to an input operation, input content is displayed through a human-computer interaction interface; wherein the input content includes creation demand information and golden sentence demand information.
[0047] When the user operates through the keyboard, mouse or other input devices, the system responds immediately and displays the input content. The input content includes two parts: one is the creation demand information, such as the theme, style, target audience, etc. of the document; the other is the golden sentence demand information, such as the type of golden sentence, golden sentence keywords, etc.
[0048] In step S102, in response to a confirmation operation on the input content, at least one golden sentence material associated with the creation demand information is determined from a golden sentence material library based on the golden sentence demand information.
[0049] After the user completes the input, he / she confirms the operation and the system starts processing. The system has a huge built-in golden sentence material library, covering golden sentences of various types and styles. According to the user's golden sentence demand information, the system uses intelligent algorithms to filter out golden sentence materials related to the creation needs from the material library. The screening criteria may include the theme of the golden sentence, emotional color, and the degree of matching with the creation needs.
[0050] In step S103, in response to a selection operation for a target golden sentence, a target golden sentence is determined from the at least one golden sentence material associated with the creation requirement.
[0051] The system displays the selected golden sentences to the user, and the user selects one or more as the target golden sentences. The system provides a preview function to help users more intuitively understand the effect of each golden sentence in the document. At the same time, the system can also intelligently recommend golden sentences that better meet the user's needs based on the user's selection habits and historical data.
[0052] In step S104, a target document is generated based on the creation requirement information and the target golden sentence.
[0053] Finally, the system reviews the user's creative needs information again to ensure that the generated document meets the user's expectations. The target golden sentences selected by the user are integrated into the document to form a unique copywriting style. The system uses natural language processing technology and intelligent typesetting algorithms to automatically generate the target document. The generated document is not only rich in content and unique in style, but also meets the user's creative needs.
[0054] In some embodiments, see Figure 2 , Figure 2It is a flowchart of steps S201-S204 provided in an embodiment of the present application. The golden sentence material library can be constructed through steps S201-S204, which will be explained in combination with each step.
[0055] In step S201, in response to the upload operation, the uploaded golden sentence document is obtained.
[0056] In step S202, the golden sentence document is parsed to obtain at least one golden sentence material, and a golden sentence ID is generated for each golden sentence material in the at least one golden sentence material.
[0057] In step S203, the at least one golden sentence material is stored in the target database, and the at least one golden sentence material is sent to Elasticsearch for indexing.
[0058] In step S204, the operation result is returned.
[0059] Here, users upload documents containing golden sentences (such as text files, Word documents, PDFs, etc.) to the system through the designated upload interface or interface. The system receives the files uploaded by the user and performs preliminary file type verification and integrity check. The system parses the received golden sentence documents and extracts golden sentence materials based on the document format and content. It includes steps such as text extraction, format conversion, and content cleaning. During the parsing process, the system uses natural language processing (NLP) technology or preset rules to identify golden sentences in the document. Golden sentences usually have unique expressions, profound meanings, or extensive reference value. A unique identifier (golden sentence ID) is assigned to each identified golden sentence material for subsequent management and reference.
[0060] The system selects a suitable target database (such as MySQL, PostgreSQL, etc.) to store the golden sentence material. The parsed golden sentence material and its related information (such as golden sentence ID, source, author, creation time, etc.) are stored in the database; the system connects to the Elasticsearch cluster and prepares for indexing operations. According to business needs, configure appropriate indexing strategies for the golden sentence material, such as word segmenters, field mappings, etc. The golden sentence material and its related information are sent to Elasticsearch for indexing so that they can be quickly retrieved later. After the indexing operation is completed, the system verifies to ensure that the golden sentence material has been successfully indexed and can be retrieved.
[0061] The system generates operation results based on the execution of the entire build process, including the number of successfully uploaded and parsed golden sentences, storage and indexing status, etc. The operation results are fed back to the user through the user interface or interface so that the user can understand the build progress and results.
[0062] In some embodiments, see Figure 3 , Figure 3 It is a flow chart of steps S301-S302 provided in an embodiment of the present application. The golden sentence materials in the golden sentence material library are stored in the form of vectors; determining at least one golden sentence material associated with the creation demand information from the golden sentence material library based on the golden sentence demand information can be achieved through steps S301-S302, which will be explained in combination with each step.
[0063] In step S301, an input vector is determined based on the creation requirement information and the golden sentence requirement information.
[0064] In step S302, the input vector and the vectors in the golden sentence material library are matched to determine at least one vector whose similarity is greater than the matching value, and the golden sentence material seat represented by the at least one vector is associated with the golden sentence material associated with the creation demand information; wherein the similarity is cosine similarity.
[0065] Here, in the golden sentence material library, each golden sentence material is converted into a vector. This vector can be a feature representation extracted from the golden sentence text through natural language processing technology (such as word embedding, TF-IDF, BERT, etc.). The dimension and specific value of the vector depend on the technology and model used. When receiving the creation demand information and the golden sentence demand information, the system first converts this information into an input vector. This vector can contain features such as keywords, topic tags, emotional tendencies, etc. related to the creation demand, as well as constraints such as type and style specified in the golden sentence demand. The construction of the input vector needs to comprehensively consider all aspects of the creation demand and the golden sentence demand to ensure that it can accurately reflect the user's intention. Next, the system matches the input vector with the vectors in the golden sentence material library. The core of the matching process is to calculate the similarity between the input vector and each golden sentence material vector. The cosine similarity used here is an indicator to measure the degree of similarity between the directions of two vectors, and the value range is between [-1,1]. The closer the cosine similarity is to 1, the more similar the directions of the two vectors are, that is, the higher the correlation between the golden sentence material and the creation demand. The system sets a matching value (usually a positive threshold), and only when the cosine similarity is greater than this matching value, the corresponding golden sentence material is considered to be associated with the creation requirement. Then, the system selects all vectors with similarities greater than the matching value from the golden sentence material library, and uses the golden sentence materials represented by these vectors as the golden sentence materials associated with the creation requirement information.
[0066] In some embodiments, see Figure 4 , Figure 4It is a flow chart of steps S401-S403 provided in an embodiment of the present application. The generation of the target document based on the creation requirement information and the target golden sentence can be achieved through steps S401-S403, which will be explained in combination with each step.
[0067] In step S401, model input information is determined based on the requirement information and the target sentence.
[0068] In step S402, the model input information is input into the AI big model, so that the AI big model generates a first document based on the model input information; wherein the first document is in Markdown format.
[0069] In step S403, a target format is determined based on the demand information, and the first document is converted into a second document in the target format, and the second document is determined as the target document.
[0070] Here, the system first integrates the creative demand information and the target golden sentences to form the model input information. This information includes the document's theme, style, target audience, keywords, target golden sentences, etc. The integrated information is preprocessed, such as removing redundant information, adjusting the format, extracting key features, etc., to ensure the accuracy and effectiveness of the input information.
[0071] Select appropriate AI big models according to business needs, such as the GPT series, BERT series, etc. These models have powerful natural language generation capabilities and can generate high-quality text content based on input information. Input the preprocessed model input information into the AI big model, and the model generates a first document in Markdown format based on the input information. Determine the format of the target document according to the format requirements in the creation requirement information, such as Word, PDF, HTML, etc. Use document conversion tools or libraries (such as Pandoc, LibreOffice, etc.) to convert the first document in Markdown format to the second document in the target format. During the conversion process, the system may need to further typeset and beautify the document to ensure the quality and readability of the target document.
[0072] In some embodiments, see Figure 5 , Figure 5 It is a flowchart of steps S501-S502 provided in an embodiment of the present application. The method also includes steps S501-S502, which will be described in combination with each step.
[0073] In step S501, the target document is subjected to a security review process; wherein the security review process includes input review and output review, the input review includes a first content review and prompt attack detection, and the output review includes a second content review and privacy information desensitization.
[0074] In step S502, when the review is passed, the target document is returned and displayed.
[0075] Here, the input information (including creation demand information, target golden sentences, etc.) is reviewed for content to ensure that it does not contain illegal, sensitive or inappropriate information for public disclosure. This step helps prevent the generated target document from causing legal disputes or social disputes due to content issues. Prompt attack refers to inducing the AI model to generate unexpected or harmful outputs through carefully designed input information. The system needs to use advanced detection technology and algorithms to detect prompt attacks on input information to ensure that it does not mislead or adversely affect the large AI model.
[0076] Conduct a content review on the first document in Markdown format generated by the AI big model to ensure that it meets content standards and requirements. This step helps ensure that the generated target document meets user needs in terms of content, logic, and expression, while avoiding grammatical errors, spelling errors, and other issues. Desensitize the private information in the target document to ensure that it does not leak the user's personal information or sensitive data. This step is critical to protecting user privacy and ensuring document security. Desensitization may include operations such as replacing, blurring, or deleting sensitive information.
[0077] When both the input review and the output review are passed, the system will return the target document to the user and display it on the user interface. At this point, the user can view, edit or share the generated target document.
[0078] In some embodiments, the method further comprises:
[0079] The golden sentence score of each golden sentence material in the at least one golden sentence material associated with the creation demand information is displayed; wherein the golden sentence score is calculated based on at least one of the matching degree, current popularity, and evaluation feedback of the golden sentence material.
[0080] Here, the system can quantify the degree of matching by calculating the cosine similarity between the golden sentence material vector and the input vector. The higher the similarity, the better the matching degree, and the higher the golden sentence score. The heat of the golden sentence material reflects its popularity or prevalence in the current time period. The system can evaluate the heat of the golden sentence material based on indicators such as the click-through rate, number of shares, and search ranking of the golden sentence material, and use the heat as a weighting factor for the golden sentence score. The higher the heat of the golden sentence material, the higher its golden sentence score. The user's evaluation feedback on the golden sentence material is also an important basis for calculating the golden sentence score. The system can collect feedback information such as likes, comments, and ratings of the golden sentence material from users, and calculate the satisfaction or praise of the golden sentence material based on this information. The higher the satisfaction or praise of the golden sentence material, the higher its golden sentence score. Based on the comprehensive consideration of at least one factor such as the degree of matching, current heat, and evaluation feedback, the system can calculate a comprehensive golden sentence score for each golden sentence material.
[0081] On the user interface, the system can display the golden sentence materials associated with the creative demand information in the form of lists, cards or other forms. Next to or below each golden sentence material, its corresponding golden sentence score can be displayed. The golden sentence score can be expressed in different ways such as numbers, stars, percentages, etc. The system can also use different colors or icons to distinguish the quality of the golden sentence materials according to the score. In addition to displaying the golden sentence score, the system can also provide interactive functions such as sorting and filtering, allowing users to sort or filter the golden sentence materials according to their needs or preferences. For example, users can choose to sort from high to low by golden sentence score, or only display golden sentence materials with a score above a certain threshold.
[0082] In some embodiments, see Figure 6 , Figure 6 It is a flowchart of steps S601-S602 provided in an embodiment of the present application. The method also includes steps S601-S602, which will be described in combination with each step.
[0083] In step S601, an adjustment area is displayed through a human-computer interaction interface; wherein the adjustment area includes the creation requirement information and the golden sentence requirement information.
[0084] In step S602, in response to the adjustment operation, the adjusted creation requirement information and the golden sentence requirement information are displayed, and the document content of the target document is adjusted in real time based on the adjusted creation requirement information and the golden sentence requirement information.
[0085] On the human-computer interaction interface, the system includes a special adjustment area for displaying and editing creative demand information and golden sentence demand information. This adjustment area can be a foldable panel, a sidebar or an independent window, and the specific form depends on the system's interface layout and user preferences. In the adjustment area, the system displays the current creative demand information and golden sentence demand information in a clear and intuitive manner. This information may include the document's subject, style, keywords, type and style of the target golden sentence, etc. Users can modify the creative demand information and golden sentence demand information in the adjustment area by clicking, dragging, inputting, etc. The system needs to design a reasonable interaction method so that users can easily perform adjustment operations.
[0086] When users make adjustments, the system needs to capture these changes in real time and regenerate or update the document content of the target document based on the adjusted creation requirement information and golden sentence requirement information. This real-time update mechanism can ensure that users always see the latest document content. In order to enhance the user's interactive experience, the system can provide real-time feedback mechanisms in the adjustment area or next to the target document, such as progress bars, prompts, or preview effects. These feedback mechanisms can help users understand the effect and progress of the adjustment operation.
[0087] In summary, the embodiments of the present application have the following beneficial effects:
[0088] (1) Significantly improve creative efficiency: With the help of intelligent sentence generation technology, users can quickly generate preliminary manuscripts, greatly shortening the time and effort required for document writing, avoiding long-term manual writing work, and improving overall work efficiency.
[0089] (2) Enhanced text personalization and creativity: Through the AI big model, the system can generate creative and personalized golden sentences to meet the diverse needs of different users and occasions. User feedback and interactive learning mechanisms further enhance the system's customization capabilities, making text creation more in line with user expectations.
[0090] (3) Breaking through traditional paradigms and achieving diversified expressions: AI big models learn various text styles from a huge corpus, avoiding the problems of repetition and single mode in manual creation, bringing new ways of expression to document creation, and improving the diversity and novelty of the text.
[0091] (4) Accurate language analysis and generation: Using natural language processing technology, the system can deeply analyze the text input by the user and generate sentences and golden sentences that are in line with the context and have depth, maintaining the consistency of language style while providing accurate and appropriate text generation.
[0092] (5) Wide range of domain adaptability: The present invention is applicable to various documents, including official documents, academic reports, business proposals, press releases and other text creation scenarios. Its strong adaptability and transfer learning capabilities enable the technology to be effective in multiple fields.
[0093] (6) Continuous optimization and learning: Through the closed-loop mechanism of user feedback and model self-learning, the system can continuously optimize and improve itself. Each interaction is a training and optimization of the system, which improves the output quality.
[0094] (7) Powerful data processing capabilities: Relying on big data processing and analysis capabilities, the system is able to process and analyze huge amounts of official documents and historical data. Intelligent sentence generation is not only based on surface information, but also incorporates actual historical background and context.
[0095] (8) Reducing human errors: By restricting grammatical rules and logical structures, the system can reduce grammatical errors and inappropriate wording in traditional manual document creation, thereby improving the quality and standardization of the text.
[0096] (9) Resource self-iteration: The system can continuously add the latest pragmatic materials, styles, and trends, achieve self-updating and evolution, and maintain the advancement and practicality of the technology.
[0097] (10) Optimizing user experience: Providing an interactive interface enables users to participate in the creation process and adjust parameters in real time to obtain the best results, thereby improving user satisfaction and participation and making the creation process more intuitive and convenient.
[0098] To sum up, the embodiments of the present application have demonstrated great advantages and potential in improving creation efficiency, enhancing text personalization and creativity, optimizing work efficiency and user experience, realizing standardized document creation, and resource self-iteration.
[0099] Based on the same inventive concept, the embodiment of the present application also provides a document generation device based on golden sentences corresponding to the document generation method based on golden sentences in the first embodiment. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned document generation method based on golden sentences, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0100] like Figure 7 As shown, Figure 7 : is a schematic diagram of the structure of a document generation device 700 based on golden sentences provided in an embodiment of the present application. The document generation device 700 based on golden sentences includes:
[0101] The input module 701 is used to display input content through the human-computer interaction interface in response to the input operation; wherein the input content includes creation demand information and golden sentence demand information;
[0102] A determination module 702 is used to respond to a confirmation operation on the input content and determine at least one golden sentence material associated with the creation requirement information from a golden sentence material library based on the golden sentence requirement information;
[0103] A selection module 703 is configured to respond to a selection operation on a target golden sentence and determine the target golden sentence from the at least one golden sentence material associated with the creation requirement;
[0104] The generation module 704 is used to generate a target document based on the creation requirement information and the target golden sentence.
[0105] Those skilled in the art should understand that Figure 7 The implementation functions of each unit in the golden sentence-based document generation device 700 shown can be understood by referring to the relevant description of the aforementioned golden sentence-based document generation method. Figure 7 The functions of the various units in the golden sentence-based document generation device 700 shown can be implemented by a program running on a processor, or can be implemented by a specific logic circuit.
[0106] In a possible implementation, the golden sentence material library is constructed in the following manner:
[0107] In response to the upload operation, the uploaded golden sentence document is obtained;
[0108] Parsing the golden sentence document to obtain at least one golden sentence material, and generating a golden sentence ID for each golden sentence material in the at least one golden sentence material;
[0109] Storing the at least one golden sentence material in a target database, and sending the at least one golden sentence material to Elasticsearch for indexing;
[0110] Returns the result of the operation.
[0111] In a possible implementation, the golden sentence materials in the golden sentence material library are stored in a vector format; the determination module 702 determines at least one golden sentence material associated with the creation requirement information from the golden sentence material library based on the golden sentence requirement information, including:
[0112] Determine an input vector based on the creation requirement information and the golden sentence requirement information;
[0113] The input vector and the vectors in the golden sentence material library are matched to determine at least one vector whose similarity is greater than the matching value, and the golden sentence material seat represented by the at least one vector is associated with the golden sentence material associated with the creation demand information; wherein the similarity is cosine similarity.
[0114] In a possible implementation, the generating module 704 generates a target document based on the creation requirement information and the target golden sentence, including:
[0115] Determine model input information based on the demand information and the target sentence;
[0116] Inputting the model input information into the AI big model, so that the AI big model generates a first document based on the model input information; wherein the first document is in Markdown format;
[0117] A target format is determined based on the demand information, and the first document is converted into a format to obtain a second document in the target format, and the second document is determined as the target document.
[0118] In a possible implementation, the generating module 704 further includes:
[0119] Performing a security review process on the target document; wherein the security review process includes input review and output review, the input review includes a first content review and prompt attack detection, and the output review includes a second content review and privacy information desensitization;
[0120] When the review is passed, the target document is returned and displayed.
[0121] In a possible implementation, the determining module 702 further includes:
[0122] The golden sentence score of each golden sentence material in the at least one golden sentence material associated with the creation demand information is displayed; wherein the golden sentence score is calculated based on at least one of the matching degree, current popularity, and evaluation feedback of the golden sentence material.
[0123] In a possible implementation, the input module 701 further includes:
[0124] An adjustment area is displayed through a human-computer interaction interface; wherein the adjustment area includes the creation requirement information and the golden sentence requirement information;
[0125] In response to the adjustment operation, the adjusted creation requirement information and the golden sentence requirement information are displayed, and the document content of the target document is adjusted in real time based on the adjusted creation requirement information and the golden sentence requirement information.
[0126] The above-mentioned document generation device based on golden sentences has the following beneficial effects:
[0127] (1) Significantly improve creative efficiency: With the help of intelligent sentence generation technology, users can quickly generate preliminary manuscripts, greatly shortening the time and effort required for document writing, avoiding long-term manual writing work, and improving overall work efficiency.
[0128] (2) Enhanced text personalization and creativity: Through the AI big model, the system can generate creative and personalized golden sentences to meet the diverse needs of different users and occasions. User feedback and interactive learning mechanisms further enhance the system's customization capabilities, making text creation more in line with user expectations.
[0129] (3) Breaking through traditional paradigms and achieving diversified expressions: AI big models learn various text styles from a huge corpus, avoiding the problems of repetition and single mode in manual creation, bringing new ways of expression to document creation, and improving the diversity and novelty of the text.
[0130] (4) Accurate language analysis and generation: Using natural language processing technology, the system can deeply analyze the text input by the user and generate sentences and golden sentences that are in line with the context and have depth, maintaining the consistency of language style while providing accurate and appropriate text generation.
[0131] (5) Wide range of domain adaptability: The present invention is applicable to various documents, including official documents, academic reports, business proposals, press releases and other text creation scenarios. Its strong adaptability and transfer learning capabilities enable the technology to be effective in multiple fields.
[0132] (6) Continuous optimization and learning: Through the closed-loop mechanism of user feedback and model self-learning, the system can continuously optimize and improve itself. Each interaction is a training and optimization of the system, which improves the output quality.
[0133] (7) Powerful data processing capabilities: Relying on big data processing and analysis capabilities, the system is able to process and analyze huge amounts of official documents and historical data. Intelligent sentence generation is not only based on surface information, but also incorporates actual historical background and context.
[0134] (8) Reducing human errors: By restricting grammatical rules and logical structures, the system can reduce grammatical errors and inappropriate wording in traditional manual document creation, thereby improving the quality and standardization of the text.
[0135] (9) Resource self-iteration: The system can continuously add the latest pragmatic materials, styles, and trends, achieve self-updating and evolution, and maintain the advancement and practicality of the technology.
[0136] (10) Optimizing user experience: Providing an interactive interface enables users to participate in the creation process and adjust parameters in real time to obtain the best results, thereby improving user satisfaction and participation and making the creation process more intuitive and convenient.
[0137] To sum up, the embodiments of the present application have demonstrated great advantages and potential in improving creation efficiency, enhancing text personalization and creativity, optimizing work efficiency and user experience, realizing standardized document creation, and resource self-iteration.
[0138] like Figure 8 As shown, Figure 8 The present invention provides a schematic diagram of the structure of an electronic device 800 according to an embodiment of the present invention. The electronic device 800 includes:
[0139] A processor 801, a storage medium 802 and a bus 803, wherein the storage medium 802 stores machine-readable instructions executable by the processor 801. When the electronic device 800 is running, the processor 801 communicates with the storage medium 802 via the bus 803, and the processor 801 executes the machine-readable instructions to perform the steps of the document generation method based on golden sentences described in the embodiment of the present application.
[0140] In actual application, the components in the electronic device 800 are coupled together via bus 803. It is understood that bus 803 is used to realize the connection and communication between these components. Bus 803 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 8 Various buses are labeled as bus 803.
[0141] The above electronic device has the following beneficial effects:
[0142] (1) Significantly improve creative efficiency: With the help of intelligent sentence generation technology, users can quickly generate preliminary manuscripts, greatly shortening the time and effort required for document writing, avoiding long-term manual writing work, and improving overall work efficiency.
[0143] (2) Enhanced text personalization and creativity: Through the AI big model, the system can generate creative and personalized golden sentences to meet the diverse needs of different users and occasions. User feedback and interactive learning mechanisms further enhance the system's customization capabilities, making text creation more in line with user expectations.
[0144] (3) Breaking through traditional paradigms and achieving diversified expressions: AI big models learn various text styles from a huge corpus, avoiding the problems of repetition and single mode in manual creation, bringing new ways of expression to document creation, and improving the diversity and novelty of the text.
[0145] (4) Accurate language analysis and generation: Using natural language processing technology, the system can deeply analyze the text input by the user and generate sentences and golden sentences that are in line with the context and have depth, maintaining the consistency of language style while providing accurate and appropriate text generation.
[0146] (5) Wide range of domain adaptability: The present invention is applicable to various documents, including official documents, academic reports, business proposals, press releases and other text creation scenarios. Its strong adaptability and transfer learning capabilities enable the technology to be effective in multiple fields.
[0147] (6) Continuous optimization and learning: Through the closed-loop mechanism of user feedback and model self-learning, the system can continuously optimize and improve itself. Each interaction is a training and optimization of the system, which improves the output quality.
[0148] (7) Powerful data processing capabilities: Relying on big data processing and analysis capabilities, the system is able to process and analyze huge amounts of official documents and historical data. Intelligent sentence generation is not only based on surface information, but also incorporates actual historical background and context.
[0149] (8) Reducing human errors: By restricting grammatical rules and logical structures, the system can reduce grammatical errors and inappropriate wording in traditional manual document creation, thereby improving the quality and standardization of the text.
[0150] (9) Resource self-iteration: The system can continuously add the latest pragmatic materials, styles, and trends, achieve self-updating and evolution, and maintain the advancement and practicality of the technology.
[0151] (10) Optimizing user experience: Providing an interactive interface enables users to participate in the creation process and adjust parameters in real time to obtain the best results, thereby improving user satisfaction and participation and making the creation process more intuitive and convenient.
[0152] To sum up, the embodiments of the present application have demonstrated great advantages and potential in improving creation efficiency, enhancing text personalization and creativity, optimizing work efficiency and user experience, realizing standardized document creation, and resource self-iteration.
[0153] The embodiment of the present application also provides a computer-readable storage medium, which stores executable instructions. When the executable instructions are executed by at least one processor 801, the document generation method based on golden sentences described in the embodiment of the present application is implemented.
[0154] In some embodiments, the storage medium can be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface storage, an optical disk, or a compact disc read-only memory (CDROM); it can also be various devices including one or any combination of the above memories.
[0155] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0156] As an example, executable instructions may, but do not necessarily, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).
[0157] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0158] The computer-readable storage medium has the following advantages:
[0159] (1) Significantly improve creative efficiency: With the help of intelligent sentence generation technology, users can quickly generate preliminary manuscripts, greatly shortening the time and effort required for document writing, avoiding long-term manual writing work, and improving overall work efficiency.
[0160] (2) Enhanced text personalization and creativity: Through the AI big model, the system can generate creative and personalized golden sentences to meet the diverse needs of different users and occasions. User feedback and interactive learning mechanisms further enhance the system's customization capabilities, making text creation more in line with user expectations.
[0161] (3) Breaking through traditional paradigms and achieving diversified expressions: AI big models learn various text styles from a huge corpus, avoiding the problems of repetition and single mode in manual creation, bringing new ways of expression to document creation, and improving the diversity and novelty of the text.
[0162] (4) Accurate language analysis and generation: Using natural language processing technology, the system can deeply analyze the text input by the user and generate sentences and golden sentences that are in line with the context and have depth, maintaining the consistency of language style while providing accurate and appropriate text generation.
[0163] (5) Wide range of domain adaptability: The present invention is applicable to various documents, including official documents, academic reports, business proposals, press releases and other text creation scenarios. Its strong adaptability and transfer learning capabilities enable the technology to be effective in multiple fields.
[0164] (6) Continuous optimization and learning: Through the closed-loop mechanism of user feedback and model self-learning, the system can continuously optimize and improve itself. Each interaction is a training and optimization of the system, which improves the output quality.
[0165] (7) Powerful data processing capabilities: Relying on big data processing and analysis capabilities, the system is able to process and analyze huge amounts of official documents and historical data. Intelligent sentence generation is not only based on surface information, but also incorporates actual historical background and context.
[0166] (8) Reducing human errors: By restricting grammatical rules and logical structures, the system can reduce grammatical errors and inappropriate wording in traditional manual document creation, thereby improving the quality and standardization of the text.
[0167] (9) Resource self-iteration: The system can continuously add the latest pragmatic materials, styles, and trends, achieve self-updating and evolution, and maintain the advancement and practicality of the technology.
[0168] (10) Optimizing user experience: Providing an interactive interface enables users to participate in the creation process and adjust parameters in real time to obtain the best results, thereby improving user satisfaction and participation and making the creation process more intuitive and convenient.
[0169] To sum up, the embodiments of the present application have demonstrated great advantages and potential in improving creation efficiency, enhancing text personalization and creativity, optimizing work efficiency and user experience, realizing standardized document creation, and resource self-iteration.
[0170] In the several embodiments provided in the present application, it should be understood that the disclosed methods and electronic devices can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0171] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0172] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0173] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a platform server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0174] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A document generation method based on golden sentences, characterized in that: The method comprises: In response to the input operation, the input content is displayed through the human-computer interaction interface; wherein the input content includes creation demand information and golden sentence demand information; In response to a confirmation operation on the input content, based on the golden sentence demand information, at least one golden sentence material associated with the creation demand information is determined from a golden sentence material library; In response to a selection operation for a target golden sentence, determining a target golden sentence from the at least one golden sentence material associated with the creation requirement; A target document is generated based on the creation requirement information and the target golden sentence.
2. The method according to claim 1, characterized in that The golden sentence material library is constructed in the following way: In response to the upload operation, the uploaded golden sentence document is obtained; Parsing the golden sentence document to obtain at least one golden sentence material, and generating a golden sentence ID for each golden sentence material in the at least one golden sentence material; Storing the at least one golden sentence material in a target database, and sending the at least one golden sentence material to Elasticsearch for indexing; Returns the result of the operation.
3. The method according to claim 1, characterized in that The golden sentence materials in the golden sentence material library are stored in a vector format; and determining at least one golden sentence material associated with the creation requirement information from the golden sentence material library based on the golden sentence requirement information comprises: Determine an input vector based on the creation requirement information and the golden sentence requirement information; The input vector and the vectors in the golden sentence material library are matched to determine at least one vector whose similarity is greater than the matching value, and the golden sentence material seat represented by the at least one vector is associated with the golden sentence material associated with the creation demand information; wherein the similarity is cosine similarity.
4. The method according to claim 1, characterized in that: The generating a target document based on the creation requirement information and the target golden sentence includes: Determine model input information based on the demand information and the target sentence; Inputting the model input information into the AI big model, so that the AI big model generates a first document based on the model input information; wherein the first document is in Markdown format; A target format is determined based on the demand information, and the first document is converted into a format to obtain a second document in the target format, and the second document is determined as the target document.
5. The method according to claim 1, characterized in that The method further comprises: Performing a security review process on the target document; wherein the security review process includes input review and output review, the input review includes a first content review and prompt attack detection, and the output review includes a second content review and privacy information desensitization; When the review is passed, the target document is returned and displayed.
6. The method according to claim 1, characterized in that The method further comprises: The golden sentence score of each golden sentence material in the at least one golden sentence material associated with the creation demand information is displayed; wherein the golden sentence score is calculated based on at least one of the matching degree, current popularity, and evaluation feedback of the golden sentence material.
7. The method according to claim 1, characterized in that The method further comprises: An adjustment area is displayed through a human-computer interaction interface; wherein the adjustment area includes the creation requirement information and the golden sentence requirement information; In response to the adjustment operation, the adjusted creation requirement information and the golden sentence requirement information are displayed, and the document content of the target document is adjusted in real time based on the adjusted creation requirement information and the golden sentence requirement information.
8. A document generation device based on golden sentences, characterized in that: The device comprises: An input module, used to display input content through a human-computer interaction interface in response to an input operation; wherein the input content includes creation demand information and golden sentence demand information; A determination module, configured to respond to a confirmation operation on the input content and determine at least one golden sentence material associated with the creation requirement information from a golden sentence material library based on the golden sentence requirement information; A selection module is used to respond to a selection operation on a target golden sentence and determine the target golden sentence from the at least one golden sentence material associated with the creation requirement; A generation module is used to generate a target document based on the creation requirement information and the target golden sentence.
9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to execute the golden sentence-based document generation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the document generation method based on golden sentences as described in any one of claims 1 to 7 is executed.