Assistance writing method, electronic device, storage medium, and program product

CN122885181APending Publication Date: 2026-10-09ANHUI IFLYTEK INTELLIGENT SYST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611119342.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0004]本发明提供一种辅助写作方法、电子设备、存储介质和程序产品,用以解决相关技术中辅助写作所调取的素材不符合用户需求,影响辅助写作的精准度的缺陷

Benefits of technology

[0015]本发明还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述辅助写作方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122885181A_ABST
    Figure CN122885181A_ABST
Patent Text Reader

Abstract

The application provides an auxiliary writing method, an electronic device, a storage medium and a program product, and the method comprises the following steps: determining user preference information for a writing task based on the correlation between a description text of the user for the writing task and portrait information of the user; determining a task weight of each task keyword based on the correlation between each task keyword corresponding to the writing task and the description text and the correlation between each task keyword and the user preference information; retrieving a first file related to the writing task from a candidate file based on each task keyword and the task weight of each task keyword; and performing auxiliary writing based on the first file. The method, device, medium and product provided by the application greatly improve the accuracy of material matching by automatically retrieving the first file that adapts to the writing task and the user characteristics as writing materials, thereby improving the reliability and efficiency of auxiliary writing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to an auxiliary writing method, electronic device, storage medium, and program product. Background Technology

[0002] Currently, the writing assistance system can search for materials in local files, thus providing users with preliminary writing materials.

[0003] However, material retrieval is usually based on static, single-keyword literal matching. The writing materials retrieved in this way are often large in scale, and most of them are irrelevant to the writing task. This makes the materials used to assist writing seriously out of touch with the user's actual needs, and it is difficult to meet the requirements of high-precision writing assistance. Summary of the Invention

[0004] This invention provides a writing assistance method, electronic device, storage medium, and program product to address the shortcomings of related technologies where the materials retrieved for writing assistance do not meet user needs, thus affecting the accuracy of the writing assistance.

[0005] This invention provides an auxiliary writing method, comprising: Based on the correlation between the user's description of the writing task and the user's profile information, user preference information for the writing task is determined; Based on the relevance between each task keyword corresponding to the writing task and the descriptive text, and the relevance between each task keyword and the user preference information, the task weight of each task keyword is determined; Based on the task keywords and their respective task weights, a first file related to the writing task is retrieved from the candidate files. Based on the first document, assist in writing.

[0006] According to a writing assistance method provided by the present invention, the step of retrieving a first file related to the writing task from candidate files based on the task keywords and the task weights of the task keywords includes: Based on the task weight of each task keyword, the task keywords are weighted to obtain a weighted keyword vector. Based on the relevance between the weighted keyword vector and the summary information of the candidate documents, the relevance score of the candidate documents is determined; Based on the relevance scores of the candidate documents, a first document relevant to the writing task is selected from the candidate documents.

[0007] According to an auxiliary writing method provided by the present invention, determining the relevance score of the candidate document based on the relevance between the weighted keyword vector and the summary information of the candidate document includes: The relevance score of the candidate document is determined based on the relevance between the weighted keyword vector and the summary information of the candidate document, and the relevance between the user profile information and the candidate document.

[0008] According to a writing assistance method provided by the present invention, the writing assistance based on the first document includes: Based on the first file and the task template of the writing task, a writing framework and scenario-based keywords for the writing task are generated. Based on the contextualized keywords, retrieve online information related to the writing task; Based on the network information, the writing framework is filled in to obtain the second document.

[0009] The writing assistance method provided by the present invention further includes: Based on the user's profile information, the recommendation priority of the candidate templates is determined; From the candidate templates whose task type matches the writing task, the candidate template with the highest recommendation priority is determined and used as the task template for the writing task.

[0010] According to a writing assistance method provided by the present invention, the step of filling in the writing framework based on the network information includes: The online information is populated into the writing framework based on at least one of the following: content type, credibility, and relevance to each chapter in the writing framework.

[0011] The writing assistance method provided by the present invention further includes: Obtain the writing question input by the user; Based on at least one of the following: the location information of the writing question in the writing framework, the context information, the first file, and the network information, an answer to the writing question is generated and the answer is populated into the writing framework.

[0012] The writing assistance method provided by the present invention further includes at least one of the following: Identify the differences between the first file and the network information, and display the information to be confirmed based on the differences. The missing information in the second file is retrieved to obtain supplementary network information. The second file is then supplemented by combining the first file and the supplementary network information.

[0013] The writing assistance method provided by the present invention further includes: Retrieve user modification actions; Based on the modification operation, the parameters of the writing assistance model are iterated, and the writing assistance model is used to perform the writing assistance.

[0014] According to a writing assistance method provided by the present invention, the user profile information includes at least one of the user's role information, region information, style information, and preference information. The present invention also provides a writing assistance device, comprising the following modules: The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the above-described auxiliary writing methods.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the writing assistance method as described above.

[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described auxiliary writing methods.

[0017] The writing assistance method, electronic device, storage medium, and program product provided by this invention determine user preference information based on the descriptive text of the writing task and user profile information, and dynamically calculate the task weight of task keywords accordingly. This allows for the retrieval of a first file, achieving a multi-level, adaptive writing association mechanism. This effectively solves the problems of lack of context awareness and inability to be personalized due to static, single-keyword literal matching of materials. It achieves highly accurate and highly personalized dynamic file association. By automatically retrieving a first file adapted to the writing task and user characteristics as writing material, it greatly improves the accuracy of material matching, thereby enhancing the reliability and efficiency of writing assistance. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in this invention or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is one of the flowcharts of the writing assistance method provided by the present invention.

[0020] Figure 2This is a schematic diagram of the semantic matching process provided by the present invention.

[0021] Figure 3 This is the second flowchart of the writing assistance method provided by the present invention.

[0022] Figure 4 This is a schematic diagram of the structure of the writing aid provided by the present invention.

[0023] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0025] All actions involving the acquisition of signal information or data in this invention are carried out in compliance with the relevant data protection laws and policies of the country where the device is located, and with the authorization granted by the owner of the device.

[0026] With the rapid development of artificial intelligence technology, the ability to generate large language models has facilitated office writing. The emergence of writing assistance systems based on large language models has improved writing efficiency and become an important way to help users complete efficient writing.

[0027] Currently, assisted writing systems can perform basic text extraction on local files in single formats such as Word and TXT, thereby enabling the categorized storage and simple content retrieval of local files to meet users' basic management needs for local files.

[0028] However, assisted writing systems primarily rely on static, single-keyword literal matching to retrieve content from local files. They only support static parsing of single formats and lack cross-format content association and task-based dynamic file association capabilities. This crude retrieval method leads to a severe disconnect between the acquisition of writing materials and the user's actual needs. The local files retrieved by the system are often massive and irrelevant to the writing task, forcing users to perform tedious manual filtering, resulting in low overall writing efficiency.

[0029] In response, this invention provides an auxiliary writing method. Figure 1 This is one of the flowcharts illustrating the writing assistance method provided by the present invention, such as... Figure 1 As shown, the method includes: Step 110: Determine user preference information for the writing task based on the correlation between the user's description text of the writing task and the user's profile information.

[0030] Specifically, a writing task refers to a text writing task that the user needs to complete, such as writing an annual work summary, official documents, industry reports, or correspondence.

[0031] For writing tasks, users can input text to describe the writing requirements. That is, the description text can be understood as the specific requirements information entered by the user for the writing task. The description text can include structured instructions and unstructured descriptions, such as writing topic, scene requirements, word limit, style requirements, and core points.

[0032] Furthermore, for users performing writing tasks, user profile information can also be obtained. Here, user profile information refers to a collection of information reflecting dimensions such as a user's personal characteristics, professional background, and behavioral habits. For example, user profile information may include the user's role information, such as market analyst, designer, technical documentation engineer, etc.; user profile information may also include the user's regional information, such as province A, city B, etc.; user profile information may also include the user's writing style information, such as a preference for formal reports, creative copywriting, technical white papers, etc.; user profile information may also include the user's writing preference information, such as a preference for data-driven, storytelling, and minimalist writing.

[0033] After obtaining the descriptive text input by the user for the writing task and the user's profile information, the relevance between the two can be calculated, and user preference information for that writing task can be determined based on this relevance. Here, user preference information is a weighted result of the user profile information. Compared to generalized user profile information, user preference information strengthens the parts of the user profile information that are more relevant to the current writing task and weakens the parts that are irrelevant. Therefore, it reflects the user's personalized preferences and priorities for the current writing task. In other words, user preference information reflects which user traits are more important for the current writing task.

[0034] For example, pre-trained models such as text encoders and BERT (Bidirectional Encoder Representations from Transformers) can be used to convert descriptive text into semantic vectors. Furthermore, the features of each dimension in the portrait information are transformed into corresponding portrait vectors, which may include, for example, character vectors. Region vector Style vectors and preference vector Then, based on the attention mechanism, a semantic vector describing the text can be calculated. The correlation between each profile vector and the calculated correlation is used as a weight to weight each profile vector, thereby obtaining user preference information that reflects the user's characteristics under the current writing task. For example, in relevance calculation based on attention mechanisms, semantic vectors describing the text can be used. As the query vector in the attention mechanism, the profile vector These serve as the key vector (Key) and value vector (Value) in the attention mechanism.

[0035] Step 120: Determine the task weight of each task keyword based on the relevance between each task keyword corresponding to the writing task and the descriptive text, and the relevance between each task keyword and the user preference information.

[0036] Specifically, for the current writing task, multiple task keywords corresponding to that task can be obtained. Here, task keywords refer to words related to a type of writing task extracted from a pre-built thesaurus or from historical text. For example, for the writing task "Annual Work Summary", the corresponding task keywords may include "work results", "project progress", "problem improvement", etc.

[0037] For each task keyword corresponding to the writing task, the relevance between the task keyword and the descriptive text can be calculated to assess the degree of fit between the task keyword and the current writing task itself. The relevance between the task keyword and the user preference information obtained in step 110 can also be calculated to assess the degree of fit between the task keyword and the user's personal characteristics. Combining the relevance between each task keyword and the descriptive text, and the relevance between each task keyword and the user preference information, the task weight of each task keyword can be obtained.

[0038] Here, for any given task keyword, the task weight of that keyword can be reflected as the degree of importance that task keyword exhibits compared to other task keywords under the current specific descriptive text and the preferences of a specific user.

[0039] For example, for any given task keyword, we can weight and sum the relevance of that keyword to the descriptive text and its relevance to user preference information to obtain the summed relevance of that keyword. Then, we normalize the weighted relevance of all task keywords using a function such as Softmax, thus obtaining the task weights of all task keywords. Therefore, the task keywords... The task weight can be expressed as the following formula: In the formula, Task keywords The vector, and These are the learnable weight coefficients.

[0040] Step 130: Based on the task keywords and their respective task weights, retrieve the first file related to the writing task from the candidate files.

[0041] Specifically, candidate files refer to various types of local materials or data that are pre-stored and available for retrieval. Candidate files can cover a variety of formats, such as Word documents, spreadsheets, presentations, etc.

[0042] After determining the keywords for each task and their corresponding task weights, candidate files that can serve as material for the current writing task can be retrieved from the candidate files based on the task keywords carrying task weights. These candidate files are then used as the first file. Here, the first file can be understood as the candidate files that are highly matched with the current writing task and user characteristics.

[0043] Furthermore, during the retrieval process, task keywords can be weighted based on task weights. The first file is then retrieved from the candidate files based on these weighted task keywords. Compared to related technologies that match static, literal keywords, this approach can accurately extract files that match the current writing task and user characteristics as writing material. Because task weights are introduced, candidate files with higher match rates to high-weight task keywords have a higher probability of being retrieved or a higher relevance score. Therefore, based on the scores, one or more of the most relevant candidate files can be selected as the first file.

[0044] In some embodiments, the search for the first document can be achieved by matching the weighted task keywords with the summaries of each candidate document.

[0045] In other embodiments, when candidate files may exist in multiple formats, such as tables and presentations, structured parsing can be performed on candidate files of different formats. This converts non-text information in candidate files of different formats into text descriptions that meet the requirements of the writing task. For example, structured parsing can be performed on data in tables and chart logic in presentations. For example, the "Annual KIP Completion Rate" data in a table can be converted into a text description such as "Completion Status of Core Indicators This Year: XX Indicator Achievement Rate 120%, XX Indicator Achievement Rate 95%". This overcomes the limitation of related technologies that can only analyze and apply to text types. The resulting text description can be used for first document retrieval in the first document 130, or it can be used as content in the first document to assist in writing. This embodiment of the invention does not specifically limit this.

[0046] Step 140: Based on the first document, perform auxiliary writing.

[0047] Specifically, once the first document is retrieved, it can be used as reliable background material and data support, and applied to subsequent auxiliary writing processes.

[0048] For example, the content and data in the first file can be extracted and combined with the user's descriptive text input into the large language model. The large language model can then be called to generate a first draft that meets the user's needs. Alternatively, operations such as grammar correction, logical organization, automatic filling, and question-and-answer interaction can be performed based on the first file, thereby assisting the user in completing the writing task from framework building to content improvement.

[0049] In the assisted writing method provided in this embodiment of the invention, user preference information is determined based on the description text of the writing task and the user's profile information, and the task weight of the task keywords is dynamically calculated based on this. The first file is then retrieved to achieve a multi-level, adaptive writing association mechanism. This effectively solves the problems of lack of context awareness and inability to be personalized caused by static, single-keyword literal matching of materials. It achieves highly accurate and highly personalized dynamic file association. By automatically retrieving the first file that is adapted to the writing task and user characteristics as writing material, the accuracy of material matching is greatly improved, thereby improving the reliability and efficiency of assisted writing.

[0050] Based on the above embodiments, in step 130, retrieving a first file related to the writing task from the candidate files based on the task keywords and their respective task weights includes: Based on the task weight of each task keyword, the task keywords are weighted to obtain a weighted keyword vector. Based on the relevance between the weighted keyword vector and the summary information of the candidate documents, the relevance score of the candidate documents is determined; Based on the relevance scores of the candidate documents, a first document relevant to the writing task is selected from the candidate documents.

[0051] Specifically, after determining each task keyword and its corresponding task weight, the semantic vector of each task keyword can be weighted based on the calculated task weight, thereby obtaining a weighted keyword vector. Here, the weighted keyword vector can be obtained by summing the weighted semantic vectors of each task keyword, or it can be obtained by applying each task weight as an attention weight to the value vector corresponding to the semantic vector of the task keyword under a multi-head attention mechanism. This embodiment of the invention does not specifically limit this.

[0052] Understandably, the resulting weighted keyword vector integrates the semantic features of each task keyword and its importance in the current writing task.

[0053] Based on this, the relevance between the weighted keyword vector and the summary information of each candidate text can be calculated, and then a relevance score for the candidate document can be determined based on this relevance. Here, the relevance score can quantify the degree of matching between the candidate document and the current writing task and user characteristics.

[0054] The summary information here refers to the text or vector representation obtained by summarizing and refining the candidate documents. To reduce the problem of excessive memory consumption during loading due to too many local files, a large number of local candidate files can be pre-mapped offline, and corresponding summary information can be extracted and generated. Therefore, during the actual retrieval process, only the relatively lightweight summary information needs to be loaded, without loading the full text of the candidate files, effectively solving the memory consumption problem.

[0055] For example, the relevance between the weighted keyword vector and the summary information of each candidate text can be calculated using multi-head attention mechanisms or cosine similarity algorithms.

[0056] Taking a multi-head attention mechanism as an example, a weighted keyword vector can be used as the query vector, the n-gram vector of the candidate file's summary information as the key vector, and the semantic vector of the summary information as the value vector. Cross-attention calculation is then performed to obtain a numerical matching score, which serves as the relevance score of the candidate file. In this process, using the n-gram vector as the key preserves fine-grained matching signals such as local phrases, fixed collocations, and domain terms from the summary information. This is more conducive to accurately locating segments in the candidate file that are highly relevant to the task keywords during cross-attention calculation, thereby improving the interpretability and hit rate of the relevance calculation. Using the semantic vector as the value allows the value to carry the overall context and abstract semantic information of the summary information, ensuring semantic coherence and robustness, and avoiding the sparsity and literal matching limitations caused by relying solely on n-grams. In this embodiment of the invention, combining the n-gram vector and semantic vector of the summary information for relevance calculation can balance interpretability and semantic generalization ability.

[0057] After obtaining the relevance scores of each candidate file, all candidate files participating in the matching can be sorted according to their relevance scores. The top N files with the highest scores, or all files with scores exceeding a preset threshold, can be selected as the first file that meets the requirements of the current writing task.

[0058] In some embodiments, after determining the first file based on the summary information, the complete candidate file corresponding to the summary information can be dynamically loaded from the local file library as the first file based on a pre-established mapping relationship.

[0059] For example, Figure 2 This is a schematic diagram of the semantic matching process provided by the present invention, such as... Figure 2 As shown, for writing tasks, task keywords corresponding to the writing task can be automatically constructed. Furthermore, for a massive amount of locally stored candidate files, summaries can be extracted from the candidate files to obtain their summary information, and a mapping relationship can be established between the candidate files and their summary information. Based on this, semantic matching can be performed between the summary information and the task keywords weighted according to task weights, thereby calculating the relevance between the summary information and the weighted keyword vector. Based on this, the first file is determined, and offline mapping loading from the summary information of the first file to the first file itself is achieved through the mapping relationship.

[0060] In this embodiment of the invention, a weighted keyword vector is obtained by weighting the task keywords, and the relevance is calculated with the summary information of the candidate files to select the first file. This effectively reduces the memory usage when processing a large number of local candidate files and avoids system lag caused by loading the full text.

[0061] Based on any of the above embodiments, step 130, determining the relevance score of the candidate document based on the relevance between the weighted keyword vector and the summary information of the candidate document, includes: The relevance score of the candidate document is determined based on the relevance between the weighted keyword vector and the summary information of the candidate document, and the relevance between the user profile information and the candidate document.

[0062] Specifically, when calculating the relevance score of candidate documents, in addition to considering the relevance between the weighted keyword vector and the summary information of the candidate documents, the relevance between the user's profile information and the candidate documents can also be considered. For example, the two types of relevance can be weighted and summed to obtain the relevance score of the candidate documents.

[0063] Here, the relevance between a user's profile information and candidate files can be specifically represented as the relevance between one or more profile features and features in the same dimension of the candidate files. For example, it could be the relevance between the character vector and region vector in the profile information and the character characteristics and region characteristics in the candidate files, respectively; or it could be the relevance between the region vector and style vector in the profile information and the region characteristics and style characteristics in the candidate files, respectively. This relevance can be calculated using multi-head attention mechanisms or algorithms such as cosine similarity.

[0064] For example, the relevance score of a candidate file can be expressed as the following formula: in, That is, the correlation score; This represents the multi-head attention mechanism, in which , , These are the weighted keyword vector, the n-gram vector of the summary information, and the semantic vector of the summary information, respectively. This refers to user profile bias, which is the relevance between a user's profile information and summary information. It can be represented as: In the formula, , , and These are the learnable weights for style, region, role, and preference, respectively. Represents vector similarity, , , and These are the style characteristics, regional characteristics, role characteristics, and preference characteristics of the candidate files.

[0065] For example, if a user is a sales manager in City B, when writing an annual summary, candidate documents containing information such as "sales volume in City B" and "market in City B" will be assigned a higher relevance score because they are highly related to the regional and role information in the user's profile information. As a result, they are more likely to be retrieved as the first document.

[0066] In this embodiment of the invention, the user's personalized characteristics are incorporated into the relevance score calculation of the candidate documents, thereby ensuring that the first document retrieved matches the user's real needs in terms of writing style, regional examples, and role perspective, further improving the accuracy of material matching and the level of intelligence in writing assistance.

[0067] Based on any of the above embodiments, in order to retrieve the first file from the candidate files, a file scheduling model can be pre-trained to construct user profile information, extract user preference information, construct task keywords for the writing task and extract the task weights of each task keyword, and calculate the relevance score of each candidate file.

[0068] The loss function of the file scheduling model can include keyword selection loss, document ranking loss, and profile consistency loss. Keyword selection loss can employ the cross-entropy loss function, which optimizes and guides the accuracy of the file scheduling model's keyword selection by calculating the difference between the task keywords predicted by the file scheduling model and the manually labeled real keywords. Document ranking loss can use the contrastive learning loss function, aiming to narrow the distance between relevant document vectors and writing task vectors in the vector space, while widening the vector distance between irrelevant documents, thereby improving the accuracy of first-file retrieval and ranking. Profile consistency loss is used to constrain and ensure that the style output by the file scheduling model remains stable when the same user processes similar writing tasks, avoiding a severe shift in overall preference due to a single abnormal input.

[0069] In addition, it can capture user clicks or adoptions of recommended information in real time and use these behaviors as feedback signals to fine-tune the weights of each dimension in the corresponding user profile; and during the process of retrieving the first document, it can automatically identify the timeliness and regional characteristics of the candidate documents, dynamically improve the relevance scores of recent events and typical cases in the same region as the user, and ensure that the retrieved first document has timeliness reference value.

[0070] Therefore, the output of the file scheduling model can include a list of task keywords, a list of first documents and their summaries, and a relational graph. The task keyword list can be sorted by task weight and can include explanations of these weights, such as indicating that a keyword is recommended with high priority due to its regional or role characteristics. In the list of first documents and their summaries, the first documents can be sorted by relevance score, and the most relevant sentences in the summaries can be highlighted on the front-end interface to help users quickly locate core materials. The relational graph is a visual representation that intuitively presents the multi-dimensional attentional interaction intensity between the writing task, task keywords, first documents, and user profile, facilitating user understanding of the retrieval logic and reasons for association in writing support.

[0071] To implement the file scheduling model described above, vector storage can be implemented using high-performance vector databases such as Milvus or Pinecone, and it supports multi-condition hybrid filtering retrieval based on metadata such as author and region. The model training and deployment environment uses PyTorch Lightning combined with HuggingFace Transformers.

[0072] Based on any of the above embodiments, step 140, the step of assisting in writing based on the first document, includes: Based on the first file and the task template of the writing task, a writing framework and scenario-based keywords for the writing task are generated. Based on the contextualized keywords, retrieve online information related to the writing task; Based on the network information, the writing framework is filled in to obtain the second document.

[0073] Specifically, here, a task template refers to a preset or user-defined template file used to standardize the layout, structure, and formatting requirements of the current writing task. For example, it could be a standard official document template, an annual summary template, or a resume template.

[0074] After obtaining the first document relevant to the current writing task, it can be input along with the task template into the large language model. The large language model analyzes the first document and the task template to derive the framework structure required for the writing task, thus generating the writing framework. In addition, the large language model can also identify content gaps or parts that require external data support based on the generated writing framework, thereby automatically generating contextualized keywords for targeted searches.

[0075] The writing framework refers to the preliminary content outline or chapter logical structure generated for the current writing task, such as chapter titles like "Industry Trend Analysis," "Project Achievements," and "Next Year's Plan" generated for an annual summary task. Contextualized keywords refer to search terms with a clear context, such as "2025 XX Industry Development Trends and Policy Impact" or "XX Position's 2025 Work Focus: Digital Transformation."

[0076] That is, in the embodiments of the present invention, the application of a large language model can realize the automatic conversion from the local first file to the writing framework, and provide guidance for subsequent online information retrieval.

[0077] After generating contextualized keywords, a search can be performed using a web retrieval module, such as a search engine adapted to a specific ecosystem, with the external network as the search source. By using contextualized keywords with clear contextual statements, relevant online information can be selectively extracted from massive amounts of data. The resulting online information refers to publicly available external materials obtained through the internet or specific compliant networks that can provide data support, viewpoint citations, or case studies for the writing task. These can include industry reports, authoritative news, academic papers, etc.

[0078] Furthermore, in confidential office environments without network access, the search source can be a private knowledge base deployed on a local server; while for non-confidential writing environments that require the latest policies and industry data support, the search source can be compliant network resources accessible through a secure gateway, such as authoritative industry databases.

[0079] After obtaining the relevant online information for the writing task, the large language model can be used to populate the writing framework with this information. Specifically, this population can be achieved by the large language model breaking down the online information according to the chapter logic of the writing framework and automatically mapping it to the corresponding positions within the framework. For example, the data "the penetration rate of digital transformation in the industry has increased to 35%" from the online information can be automatically generated into a coherent expression and populated under the "Industry Trend Analysis" chapter of the writing framework. Furthermore, the large language model can automatically complete grammatical polishing, logical organization, and style consistency during the population process, integrating local materials from the first document with external online information into the writing framework, ultimately generating a structurally complete and content-rich second document. It can be understood that this second document, which integrates the local information provided by the first document and the online information obtained from external networks, can be considered a preliminary result of the writing assistance, i.e., a draft document for assisting writing.

[0080] In this embodiment of the invention, a writing framework and scenario-based keywords are generated using a first file and a task template. Online information is then retrieved based on these keywords to fill the framework, ultimately generating a second file. This solves the problem of isolated local files and online information in traditional assisted writing, achieving a fully automated generation process involving targeted retrieval, intelligent integration, and automatic filling of online information. Furthermore, through the contextual awareness capabilities of a large language model, it can proactively identify information gaps in local materials and accurately acquire external online materials, greatly reducing the tedious manual searching, filtering, and copying / pasting operations for users and effectively improving the efficiency of assisted writing.

[0081] Based on any of the above embodiments, the writing assistance method further includes: Based on the user's profile information, the recommendation priority of the candidate templates is determined; From the candidate templates whose task type matches the writing task, the candidate template with the highest recommendation priority is determined and used as the task template for the writing task.

[0082] Here, candidate templates may include various layout and content structure templates pre-stored in a scenario-based template library, and / or custom templates extracted from the user's historical writing output, such as various official document templates, standardized industry report templates, resume templates, etc.

[0083] To achieve personalized user template matching, the system can calculate or score the matching degree of each candidate template based on user profile information, especially writing profile information that reflects the user's historical writing behavior, such as format preferences, chapter structure preferences, and common expression styles. Based on the matching degree or scoring results, the recommendation priority of each candidate template is determined. Here, recommendation priority refers to the ranking index of how well a candidate template matches the user's personal writing preferences. The higher the recommendation priority, the more the candidate template meets the user's personalized needs. For example, if the profile information reflects that the user prefers a structured format that includes specific report sections in their historical document writing, the system will assign a higher recommendation priority to candidate templates with similar characteristics.

[0084] After a user initiates a writing task, the system can filter candidate templates that match the task type based on the task description. Then, it retrieves the priority of these templates and automatically selects the highest-priority one, using it directly as the task template without requiring manual browsing or filtering by the user. For example, if the user's task is "Generate a 2025 Annual Office Work Summary," the system can initially filter all candidate templates belonging to the "Annual Summary" task type and select the highest-priority "Standard Annual Work Summary Template," using it directly as the task template for the current writing task.

[0085] Furthermore, if users make personalized modifications when using the task template, such as adding a "cross-departmental collaboration case" section to the task template each time they use it, the modification behavior can be recorded and the corresponding candidate template can be automatically updated. This forms a self-learning loop of template use, feedback, and updates, avoiding the decline in applicability caused by long-term template solidification and improving writing efficiency and user experience.

[0086] In this embodiment of the invention, the recommendation priority of candidate templates is determined by introducing user profile information, and the candidate template with the highest recommendation priority is automatically matched for the writing task, thereby realizing personalized template recommendation and solving the problem of fixed and rigid template library in traditional writing assistance systems, which requires users to manually spend time filtering.

[0087] Based on any of the above embodiments, step 140, which involves filling the writing framework based on the network information, includes: The online information is populated into the writing framework based on at least one of the following: content type, credibility, and relevance to each chapter in the writing framework.

[0088] Specifically, after retrieving online information, it can be evaluated from dimensions such as content type, credibility, and relevance, and the information can be populated into the writing framework based on the evaluation results.

[0089] Among these, the content type of online information refers to the classification of online information in terms of textual function or structural characteristics. For example, retrieved information can be broken down or divided into structured content modules such as "data support," "opinion citation," and "case supplement." The credibility of online information refers to the authority, reliability, or authenticity assessment score of the source of the online information. For example, reports officially released by industry associations and core journal articles have high credibility, while anonymous forums or personal blogs have relatively low credibility. The relevance of online information refers to the degree to which the semantics of the online information fit the themes or logical needs of specific chapters or paragraphs within the writing framework.

[0090] When incorporating online information into the writing framework, prioritize highly credible information and eliminate unreliable sources to ensure material quality. Furthermore, online information can be broken down and categorized based on its content type to form content modules. Then, based on the relevance of these modules to the chapters within the writing framework, the appropriate modules can be strategically placed into their corresponding positions according to chapter logic.

[0091] For example, when writing an annual summary report for a certain industry, a scenario-based keyword search yields multiple online articles about "digital transformation." A credibility assessment can be used to prioritize an annual report from an authoritative industry association. Next, by analyzing content types, the content module "Industry Digital Transformation Penetration Rate Increases to 35%" with a "data-supported" content type is extracted. Finally, the relevance of this content module to each chapter of the writing framework can be calculated. The "Impact of Technological Change" section under the "Industry Trend Analysis" chapter shows the highest relevance to this content module. In this case, this content module can be inserted into the corresponding position of "Impact of Technological Change."

[0092] In some embodiments, source annotations can be added to the online information to be filled into the writing frame, such as "Data source: XX Industry Research Institute 2025 Annual Report"; and before filling the online information into the writing frame, duplicate information can be removed by text fingerprint comparison technology and cross-validated with existing information in the local first file. If there is a data conflict between the online information and the first file, the user can be prompted to choose the data in the first file first, thereby ensuring the accuracy of the information.

[0093] In this embodiment of the invention, network information is screened and structurally integrated and filled based on at least one of content type, credibility, and chapter relevance. This effectively avoids the interference of redundant and false information on auxiliary writing materials, thereby ensuring that the external materials filled into the writing framework are reliable and logically rigorous, and thus improving the professionalism, accuracy, and logical coherence of the second document.

[0094] Based on any of the above embodiments, the writing assistance method further includes: Obtain the writing question input by the user; Based on at least one of the following: the location information of the writing question in the writing framework, the context information, the first file, and the network information, an answer to the writing question is generated and the answer is populated into the writing framework.

[0095] Specifically, during the text editing process based on the writing framework, users can input questions or instructions related to the current writing content, i.e., input writing questions. Writing questions can be inquiries about formatting guidelines, explanations of professional terms, queries about calculation formulas for specific data, or requests for factual support for a certain argument, such as "How is ROI calculated?"

[0096] Once the writing question is obtained, the answer to the writing question can be generated based on at least one of the following: the writing question's location within the writing framework, contextual information, first document, and network information.

[0097] Here, the location information of the writing question within the writing framework refers to the position of the cursor or the currently edited chapter / paragraph when the user enters the writing question, such as the "Project Achievements" or "Industry Trends" chapter within the writing framework. The contextual information of the writing question within the writing framework refers to the text content that has been entered or generated adjacent to this location information; the contextual information reflects the context of the paragraph containing the location information.

[0098] When generating answers to a writing question, the large language model can combine location and contextual information related to the writing question to understand the user's true intent. It also integrates local first-source files and external network information to fuse multi-source answers, thereby generating the answer content. The resulting answer content is a response text that can be directly used as writing material, meaning that the answer content fits the context of the writing framework itself and can be directly incorporated into the writing framework.

[0099] For example, when a user is editing the "Project Deliverables" section and asks the question "How is ROI calculated?", the system can use location information to determine that the user is currently in the "Project Deliverables" section and use contextual information to link to specific project cost and revenue data. The system can then generate the answer: "Based on the locally recorded costs of XX million yuan and revenue of XX million yuan for this project, the ROI calculation formula is (revenue - cost) / cost × 100%, resulting in an ROI of XX%."

[0100] Furthermore, in the process of generating answers to writing questions, relevant data from the first file can be used first. Based on this, online information can be retrieved to supplement the answers, ensuring that the answers conform to general knowledge and the actual norms of the user's organization.

[0101] Furthermore, embodiments of the present invention also support multi-turn dialogues to facilitate users in asking further detailed questions. For example, in response to a user's question, "Does the ROI include implicit benefits?", supplementary answer content can be generated: "Implicit benefits can be referenced to the industry average conversion coefficient XX. The estimated implicit benefits of this project are approximately XX million yuan, and the adjusted ROI is XX%."

[0102] After generating the answer content, you can perform a population operation on it. For example, a dialog box may prompt "Do you want to add the results of this ROI analysis to the project deliverables section?" After confirmation, the answer content will be automatically populated into the corresponding position in the writing framework.

[0103] In this embodiment of the invention, at least one of location information, context information, a first file, and network information is combined for question and answer, realizing the synergy between question and answer interaction and assisted writing process. This breaks the information silo state of the question and answer module and the editing module being isolated from each other in the traditional assisted system. It can accurately understand the writing context of the user's question and can also make full use of multi-source information from local and network sources to provide targeted answers, greatly improving the fluency and accuracy of assisted writing.

[0104] Based on any of the above embodiments, the writing assistance method further includes: Identify the differences between the first file and the network information, and display the information to be confirmed based on the differences.

[0105] Specifically, collaborative verification can be performed on the local first file and the network information from external sources, thereby ensuring that the content contained in the generated second file meets the actual requirements.

[0106] During this process, discrepancies between the primary document and online information can be identified. These discrepancies can be understood as data conflicts, inconsistencies in viewpoints, factual discrepancies, or differences in statistical methods between the primary document and online information. For example, the primary document states "sales revenue increased by 20% this year," while the online information states "the average growth rate of the market segment in which this company operates is 18%."

[0107] For such discrepancies, the large language model can annotate the discrepancies and infer the reasons for their existence, then display confirmation information to the user. This confirmation information is generated based on the discrepancies and serves as an interactive prompt to encourage the user to make a manual decision, verify facts, or provide an analysis of the reasons for the discrepancy. For example, the confirmation information could be: "The discrepancy may stem from statistical methods: local data includes subsidiaries, while online data reflects the parent company's methods. Please confirm which data to retain."

[0108] In this embodiment of the invention, cross-validation between the first file and network information can effectively prevent the intrusion of erroneous information and ensure the accuracy of the content information in the final generated second file.

[0109] Based on any of the above embodiments, the writing assistance method further includes at least one of the following: The missing information in the second file is retrieved to obtain supplementary network information. The second file is then supplemented by combining the first file and the supplementary network information.

[0110] Specifically, after generating the second document, it's possible to identify sections that fail to fully meet the writing task requirements, lack sufficient coverage of key points, or lack substantial content support and data in certain chapters, thereby revealing the missing information in the second document. For example, in the "Impact of Industry Policies" section of the annual summary, the lack of relevant local data in the first document results in a hollow section in the second document.

[0111] For missing information, relevant information can be automatically retrieved from the internet and used as supplementary online information. This supplementary online information refers to external materials obtained through targeted online searches for the identified missing information.

[0112] After obtaining supplementary online information, the first document can be combined with it to fill in any missing information in the second document. Here, the supporting arguments in the first document related to the supplementary online information can be combined with the supplementary online information itself to specifically supplement and enhance the content of the second document. For example, if the supplementary online information mentions that "digital transformation is an industry trend," while the first document mentions "the company's achievements in building a digital platform," then these two can be suggested or automatically combined to enhance the persuasiveness of the writing.

[0113] In this embodiment of the invention, by automatically supplementing the missing information in the second file via the network, information complementarity between local and network multi-source information is achieved, which improves the completeness and quality of the second file while ensuring the accuracy and rigor of the generated content.

[0114] Based on any of the above embodiments, the writing assistance method further includes: The second document is scored based on quality verification indicators; Based on the quality score, an exception handling process is executed.

[0115] Specifically, quality verification indicators can include three dimensions: compliance indicators, adaptability indicators, and completeness indicators. Compliance indicators assess the security and compliance of the second document in a specific environment, including sensitive word filtering pass rate, copyright risk coefficient, and permission adaptability. Adaptability indicators assess the degree of fit between the second document and the writing task and user characteristics, including scenario style fit, format standardization, and integration of the first document with online information. Completeness indicators assess the richness of the second document's content, including core point coverage, word count compliance rate, and logical coherence score. The scores of each individual indicator can be calculated separately and then weighted to obtain a comprehensive score. For example, the threshold for each individual indicator can be set to 0.8, and the threshold for the comprehensive score can be set to 0.85. By comparing the scores and thresholds of individual indicators, as well as the comprehensive score and its threshold, quality verification of the second document can be achieved.

[0116] For cases where a single indicator score is between 0.7 and 0.8, and the overall score is between 0.8 and 0.85, the quality verification result of the second document can be determined to be slightly abnormal. In this case, automatic optimization and adjustment can be performed without interrupting the user's operation. For example, if the completeness indicator of the second document is low, indicating insufficient material, the system can automatically retrieve missing information from the second document, trigger a compliant online search to obtain supplementary online information, or obtain key information input by the user through guided questioning, and automatically supplement and fill in the second document by combining at least one of the first document, supplementary online information, and key information; if the scene style fit in the adaptability indicator of the second document is low, indicating a style mismatch, the system can automatically adjust the parameters related to the generation style in the auxiliary writing model and regenerate the corresponding paragraphs in the second document that do not match the style; if the format standardization in the adaptability indicator of the second document is low, indicating format errors, the system can automatically re-call the task template that matches the writing task and automatically correct the format deviations in the second document.

[0117] If an individual indicator score is between 0.6 and 0.7, and the overall score is between 0.7 and 0.8, the quality verification result of the second file can be determined as moderately abnormal. In this case, multiple optimization directions can be automatically generated for the user to choose from, such as material supplementation, structural adjustment, and style correction. After receiving the user's selection of a particular optimization direction, the second file can be regenerated based on the selected direction.

[0118] If a single indicator score is below 0.6 and the overall score is below 0.7, the quality verification result of the second document can be determined as severely abnormal. In this case, a prompt message can be displayed, prompting the user to supplement or clarify the descriptive text for the writing task, such as prompting the user to refine the core points or adjust the scenario definition. After obtaining the updated descriptive text from the user, the assisted writing process is re-executed.

[0119] If, after multiple iterations and optimizations, the re-scoring still fails to meet the aforementioned threshold standard, the quality verification result of the second document can be determined to be extremely abnormal. In this case, professional editors or business experts can be contacted to provide manual assistance to the user.

[0120] Based on any of the above embodiments, the writing assistance method further includes: Retrieve user modification actions; Based on the modification operation, the parameters of the writing assistance model are iterated, and the writing assistance model is used to perform the writing assistance.

[0121] Specifically, during the assisted writing process, users can correct and edit information such as automatically generated second documents, retrieved online information, or answers to questions. In this embodiment of the invention, these actions are recorded as modification operations. Modification operations can include direct modifications to the text, such as recording the differences between the text before and after modification, or user-added modification reason tags, such as structured or unstructured evaluations like "factual error," "redundant expression," or "inappropriate format."

[0122] In some embodiments, while acquiring the modification operation, the modification operation and its context information can also be associated and stored to form complete scene feedback data. The context information here may include the complete dialogue history at that time, user queries, initial model output, etc.

[0123] In other embodiments, in addition to obtaining modification operations, the system can also obtain the satisfaction rating submitted by the user when completing the assisted writing, such as a rating of 1-5 stars, or an evaluation level such as satisfied, average, or dissatisfied.

[0124] Based on this, the parameters of the writing assistance model can be iterated based on the modification operations; or, the parameters can be iterated based on the modification operations, the feedback data of the scenario in which the modification operations occurred, and / or the satisfaction ratings submitted by users. Here, the writing assistance model is the large language model used to perform the above-mentioned tasks such as content generation, intelligent question answering, intent understanding, and framework building.

[0125] During the parameter iteration process of the writing assistance model, unstructured modification operations can be processed using natural language processing techniques such as text clustering and key information extraction. This cleanses the modification operations and transforms them into structured defect labels or optimization instructions. Training samples can then be constructed based on these. For example, SFT (Supervised Fine-Tuning) samples can be constructed, consisting of the initial query and the user's revised satisfactory answer; preference pair samples can be constructed, consisting of the initial query, the model's initial output, and the user's revised version; and reward model samples can be constructed, consisting of the initial query + model output, and user satisfaction scores or scores inferred based on the degree of modification.

[0126] Subsequently, the constructed samples can be applied to Reinforcement Learning from Human Feedback (RLHF) and continuous learning systems. For example, user modifications and preferences can be used as refinement data to train and iterate a more sophisticated reward model, enabling it to not only judge the overall quality of the text but also understand local quality. Alternatively, user-edited, satisfactory versions can be used as high-quality demonstration data to periodically perform high-frequency incremental supervised fine-tuning of the writing assistance model, allowing it to quickly absorb the latest user preferences. Finally, the updated reward model is used to perform reinforcement learning on the writing assistance model, thereby achieving alignment optimization.

[0127] Furthermore, during the parameter iteration process of the assisted writing model, user modifications and satisfaction ratings can be combined. This allows for a clear visualization of the model's initial output flaws and provides precise directional signals indicating "what's wrong" and "how to improve." This approach directly captures the gap between the user's original intent and the model's initial output, as well as the ideal state after user correction. This transforms the user from a passive evaluator into an active co-trainer, achieving a more accurate mapping of the user's true needs.

[0128] Furthermore, for the constructed preference pairs, the model's initial output can be paired with the user's modified, satisfactory version to form a suboptimal-optimal pair, which can then be used as data for contrastive learning to train the auxiliary learning model. Introducing a contrastive learning mechanism makes model parameter updates more direct and stable. Additionally, when using the updated reward model to train the auxiliary writing model through reinforcement learning, reinforcement learning algorithms such as Proximal Policy Optimization (PPO) can be employed to achieve more complex and global alignment optimization.

[0129] Furthermore, user modifications not only iterate on the weight parameters of the writing assistance model but also drive the optimization of interpretable product functional modules. Specifically, an analysis panel can be built and used to visualize statistical information such as the types of frequently requested modifications and the distribution of scenarios with low satisfaction. Since user modifications represent specific, categorizable, and attributable functional defects or needs, the analysis panel can guide targeted optimization of modules other than the writing assistance model, such as the web information retrieval module and the citation generation module, thereby promoting the coordinated iteration of the overall framework.

[0130] In this embodiment of the invention, a continuous learning mechanism for the assisted writing model is established based on real interactive dynamic feedback, extending traditional static reinforcement learning into an automated learning and updating process throughout the entire assisted writing process. By collecting low-cost, high-volume modification operations as natural modification data for parameter iteration of the assisted writing model, the problem of sparse feedback and inability to continuously align with users' real needs in the assisted writing model is solved.

[0131] Based on any of the above embodiments, the user's profile information includes at least one of the user's role information, region information, style information, and preference information.

[0132] Specifically, role information is used to represent a user's professional identity, job title, and other attributes. Since users with different roles often focus on different aspects when performing the same writing task, role information helps to pinpoint the professional perspective of the material.

[0133] Regional information is used to characterize a user's geographical location, the area of ​​business they are responsible for, or the geographical attributes of their organization. Introducing regional information can influence the weighting of reference cases with distinct regional characteristics and local regulatory preferences during candidate document matching, thereby automatically increasing the relevance of typical cases within the same region.

[0134] Style information is used to characterize the writing style exhibited by users in their historical writing behavior. The introduction of style information helps to identify the language style required for the user's current collaborative task.

[0135] Preference information is used to characterize a user's personal preferences regarding the logic of information presentation and the focus of content.

[0136] For example, suppose a user's profile information includes the role information of a market analyst, the regional information of province A, and the preference information of data-driven. After the user enters the descriptive text "Write an annual work summary", the above profile information can be merged with the descriptive text of the writing task. This can determine that the user has a high demand for materials containing "market sales data of province A" and "competitor data comparison". Therefore, when searching for the first file from the candidate files, the relevance score of the candidate files involving recent data reports of province A will be automatically increased.

[0137] Based on any of the above embodiments Figure 3 This is the second flowchart of the writing assistance method provided by the present invention, as shown below. Figure 3 As shown, the writing assistance method includes the following steps: First, obtain the descriptive text of the writing task input by the user.

[0138] Specifically, users can input descriptive text to describe the writing requirements of the writing task. This descriptive text can include the writing topic, scenario requirements, word count limits, style requirements, and key points. After obtaining the descriptive text, unstructured descriptive text can be parsed, as can structured instructions input by the user.

[0139] For example, the user-input description text is "Generate 2025 Office Work Summary, 1500 words, formal document style, key points: meeting support, document circulation, logistical services, team building".

[0140] Next, the first file is matched with the task template.

[0141] The process of obtaining the first file involves automatically constructing a keyword library based on the user-selected writing task and sorting these keywords according to their task weight. Furthermore, natural language processing techniques are used to semantically scan the summary information of local candidate files, thereby extracting summary information that matches the task keyword library. For successfully matched summary information, local candidate files can be loaded according to a pre-built mapping relationship, serving as the first file relevant to the writing task. Additionally, user profile information can be incorporated into attention calculations when calculating task weights.

[0142] Matching task templates can involve creating a writing profile for the user and prioritizing various candidate templates based on that profile. Therefore, when a user initiates a writing task, the highest-priority candidate template can be automatically recommended as the task template.

[0143] For example, the first local file obtained through matching includes: the 2024 work summary and the 2025 meeting minutes archived files in the local knowledge base of the search unit; the task template obtained through matching is "standard template for annual work summary".

[0144] Next, the second file is generated and optimized.

[0145] Specifically, the first document and task template can be input into the assisted writing model, which will then output the writing framework and contextualized keywords for the writing task. This assisted writing model can be a large language model. After generating the contextualized keywords, these keywords, containing explicit scenario statements, can be used to selectively extract relevant online information from massive amounts of online data. For example, the retrieved online information could be "Guiding Opinions on the Standardization of Office Construction in 2025".

[0146] The retrieved online information is filtered by content type, credibility, and relevance, prioritizing information from authoritative sources. The information is then automatically broken down into structured modules and filled into the corresponding positions according to the chapter logic of the writing framework, thus obtaining the second document.

[0147] Subsequently, quality verification and anomaly detection are carried out.

[0148] Specifically, based on a collaborative verification mechanism between the first file and network information, a three-dimensional verification process—compliance, adaptability, and completeness—can be used to determine whether the generated content in the second file meets the requirements. If it meets the requirements, the multi-format result is directly output; if it does not, an exception handling process is triggered to optimize the second file, and then the quality verification is re-executed. The multi-format here can include Word, PDF, Markdown, etc.

[0149] For example, the generated second file is validated, and the compliance score is 0.95, the adaptability score is 0.91, the completeness score is 0.88, the overall score is 0.91, the validation is passed, and the multi-format results are output.

[0150] For example, in cases where verification fails, if there are discrepancies between the first document and the online information, a confirmation request is generated for the user to verify. If the second document contains missing information, the online information and the first document are combined to complement each other. For instance, if the core point coverage of the second document is only 0.75, failing to meet the completeness standard, the online search is automatically triggered to supplement the missing point "team building" related cases. After iteration, the coverage improves to 0.89, meeting the requirements.

[0151] Furthermore, to ensure secure adaptation in specific office environments, local candidate file analysis is performed on the user's terminal without uploading, avoiding the risk of sensitive internal data leakage by uploading files to cloud servers. In addition, the writing assistance method is compatible with operating systems and databases that meet security requirements, and the network search module is adapted to search engines that meet security requirements, ensuring stable operation in the hardware and software ecosystem of specific office environments and solving the compatibility issues of traditional office software in specific office environments.

[0152] Finally, user feedback is gathered and the model is iterated upon.

[0153] Specifically, user modifications can be linked to satisfaction ratings to construct supervised information. This directly captures the gap between the user's original intent and the initial output of the assisted writing model, as well as the ideal state after user correction, achieving a more accurate mapping of the user's actual writing needs. Furthermore, user modifications can be used as correction data to train a reward model, with the user's revised, satisfactory version serving as a high-quality example. The satisfaction rating can be used as the training target or validation metric for the reward model, thereby achieving continuous and automated feedback data collection and an enhanced closed loop for optimizing the assisted writing model.

[0154] For example, if a user adds details about "key project protection" in the second document and submits a satisfaction rating of 4.7, the feedback can be recorded and used to assist in the iterative optimization of the writing model's parameters.

[0155] In this embodiment of the invention, a multi-level, adaptive writing association mechanism is implemented, which effectively solves the problems of lack of context awareness and inability to be personalized caused by static, single-keyword literal matching of materials. It achieves highly accurate and highly personalized dynamic file association, and by automatically retrieving the first file that is suitable for the writing task and user characteristics as writing material, the accuracy of material matching is greatly improved, thereby improving the reliability and efficiency of assisted writing.

[0156] Furthermore, by generating a writing framework and scenario-based keywords through the first file and task template, and by retrieving online information based on the scenario-based keywords to fill the framework, a second file is finally generated. This solves the problem of local files and online information being isolated from each other in traditional assisted writing, and realizes a fully automated generation process of targeted retrieval, intelligent integration, and automatic filling of online information.

[0157] By incorporating user profile information to determine the recommendation priority of candidate templates and automatically matching the candidate template with the highest recommendation priority to the writing task, personalized template recommendation is achieved, solving the problems of fixed and rigid template libraries in traditional writing assistance systems and the need for users to manually spend time filtering them.

[0158] By cross-validating the first document with network information and complementing information from multiple sources, including local and network sources, the completeness and quality of the second document are improved while ensuring the accuracy and rigor of the generated content.

[0159] Furthermore, a continuous learning mechanism for the assisted writing model was established based on real interactive dynamic feedback, extending traditional static reinforcement learning into an automated learning and updating process throughout the entire assisted writing process. By collecting low-cost, high-volume modification operations as natural modification data for parameter iteration of the assisted writing model, the problem of sparse feedback and inability to continuously align with users' real needs in the assisted writing model was solved.

[0160] The writing aid device provided by the present invention is described below. The writing aid device described below can be referred to in correspondence with the writing aid method described above.

[0161] Figure 4 This is a schematic diagram of the structure of the writing aid provided by the present invention, as shown below. Figure 4 As shown, the device includes: Preference analysis unit 410 is used to determine user preference information for the writing task based on the correlation between the user's descriptive text of the writing task and the user's profile information; The weight adaptation unit 420 is used to determine the task weight of each task keyword based on the relevance between each task keyword corresponding to the writing task and the descriptive text, and the relevance between each task keyword and the user preference information. The first retrieval unit 430 is used to retrieve a first file related to the writing task from the candidate files based on the task keywords and the task weights of the task keywords. The auxiliary generation unit 440 is used to perform auxiliary writing based on the first file.

[0162] The apparatus provided in this invention determines user preference information based on the description text of the writing task and the user's profile information, and dynamically calculates the task weight of the task keywords accordingly. It then retrieves the first file to achieve a multi-level, adaptive writing association mechanism. This effectively solves the problems of lack of context awareness and inability to be personalized caused by static, single-keyword literal matching of materials. It achieves highly accurate and highly personalized dynamic file association. By automatically retrieving the first file that adapts to the writing task and user characteristics as writing material, it greatly improves the accuracy of material matching, thereby improving the reliability and efficiency of assisted writing.

[0163] Based on the above embodiments, the first retrieval unit is specifically used for: Based on the task weight of each task keyword, the task keywords are weighted to obtain a weighted keyword vector. Based on the relevance between the weighted keyword vector and the summary information of the candidate documents, the relevance score of the candidate documents is determined; Based on the relevance scores of the candidate documents, a first document relevant to the writing task is selected from the candidate documents.

[0164] Based on any of the above embodiments, the first retrieval unit is specifically used for: The relevance score of the candidate document is determined based on the relevance between the weighted keyword vector and the summary information of the candidate document, and the relevance between the user profile information and the candidate document.

[0165] Based on the above embodiments, the auxiliary generation unit is specifically used for: Based on the first file and the task template of the writing task, a writing framework and scenario-based keywords for the writing task are generated. Based on the contextualized keywords, retrieve online information related to the writing task; Based on the network information, the writing framework is filled in to obtain the second document.

[0166] Based on any of the above embodiments, the auxiliary generation unit is further configured to: Based on the user's profile information, the recommendation priority of the candidate templates is determined; From the candidate templates whose task type matches the writing task, the candidate template with the highest recommendation priority is determined and used as the task template for the writing task.

[0167] Based on any of the above embodiments, the auxiliary generation unit is specifically used for: The online information is populated into the writing framework based on at least one of the following: content type, credibility, and relevance to each chapter in the writing framework.

[0168] Based on any of the above embodiments, the device further includes a question-and-answer unit, used for: Obtain the writing question input by the user; Based on at least one of the following: the location information of the writing question in the writing framework, the context information, the first file, and the network information, an answer to the writing question is generated and the answer is populated into the writing framework.

[0169] Based on any of the above embodiments, the device further includes a quality inspection unit, used for: Identify the differences between the first file and the network information, and display the information to be confirmed based on the differences. The missing information in the second file is retrieved to obtain supplementary network information. The second file is then supplemented by combining the first file and the supplementary network information.

[0170] Based on any of the above embodiments, the device further includes an iteration unit, used for: Retrieve user modification actions; Based on the modification operation, the parameters of the writing assistance model are iterated, and the writing assistance model is used to perform the writing assistance.

[0171] Based on any of the above embodiments, the user's profile information includes at least one of the user's role information, region information, style information, and preference information.

[0172] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute an auxiliary writing method, which includes: Based on the correlation between the user's description of the writing task and the user's profile information, user preference information for the writing task is determined; Based on the relevance between each task keyword corresponding to the writing task and the descriptive text, and the relevance between each task keyword and the user preference information, the task weight of each task keyword is determined; Based on the task keywords and their respective task weights, a first file related to the writing task is retrieved from the candidate files. Based on the first document, assist in writing.

[0173] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to related technologies, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0174] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer being able to execute the auxiliary writing methods provided by the above methods, the method comprising: Based on the correlation between the user's description of the writing task and the user's profile information, user preference information for the writing task is determined; Based on the relevance between each task keyword corresponding to the writing task and the descriptive text, and the relevance between each task keyword and the user preference information, the task weight of each task keyword is determined; Based on the task keywords and their respective task weights, a first file related to the writing task is retrieved from the candidate files. Based on the first document, assist in writing.

[0175] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the auxiliary writing methods provided by the methods described above, the method comprising: Based on the correlation between the user's description of the writing task and the user's profile information, user preference information for the writing task is determined; Based on the relevance between each task keyword corresponding to the writing task and the descriptive text, and the relevance between each task keyword and the user preference information, the task weight of each task keyword is determined; Based on the task keywords and their respective task weights, a first file related to the writing task is retrieved from the candidate files. Based on the first document, assist in writing.

[0176] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0177] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A writing aid method, characterized in that, include: Based on the correlation between the user's description of the writing task and the user's profile information, user preference information for the writing task is determined; Based on the relevance between each task keyword corresponding to the writing task and the descriptive text, and the relevance between each task keyword and the user preference information, the task weight of each task keyword is determined; Based on the task keywords and their respective task weights, a first file related to the writing task is retrieved from the candidate files. Based on the first document, assist in writing.

2. The writing assistance method according to claim 1, characterized in that, The step of retrieving a first file related to the writing task from the candidate files based on the task keywords and their respective task weights includes: Based on the task weight of each task keyword, the task keywords are weighted to obtain a weighted keyword vector. Based on the relevance between the weighted keyword vector and the summary information of the candidate documents, the relevance score of the candidate documents is determined; Based on the relevance scores of the candidate documents, a first document relevant to the writing task is selected from the candidate documents.

3. The writing assistance method according to claim 2, characterized in that, The step of determining the relevance score of the candidate document based on the relevance between the weighted keyword vector and the summary information of the candidate document includes: The relevance score of the candidate document is determined based on the relevance between the weighted keyword vector and the summary information of the candidate document, and the relevance between the user profile information and the candidate document.

4. The writing assistance method according to claim 1, characterized in that, The auxiliary writing based on the first document includes: Based on the first file and the task template of the writing task, a writing framework and scenario-based keywords for the writing task are generated. Based on the contextualized keywords, retrieve online information related to the writing task; Based on the network information, the writing framework is filled in to obtain the second document.

5. The writing assistance method according to claim 4, characterized in that, Also includes: Based on the user's profile information, the recommendation priority of the candidate templates is determined; From the candidate templates whose task type matches the writing task, the candidate template with the highest recommendation priority is determined and used as the task template for the writing task.

6. The writing assistance method according to claim 4, characterized in that, The process of filling the writing framework based on the network information includes: The online information is populated into the writing framework based on at least one of the following: content type, credibility, and relevance to each chapter in the writing framework.

7. The writing assistance method according to claim 4, characterized in that, Also includes: Obtain the writing question input by the user; Based on at least one of the following: the location information of the writing question in the writing framework, the context information, the first file, and the network information, an answer to the writing question is generated and the answer is populated into the writing framework.

8. The writing assistance method according to claim 4, characterized in that, It also includes at least one of the following: Identify the differences between the first file and the network information, and display the information to be confirmed based on the differences. The missing information in the second file is retrieved to obtain supplementary network information. The second file is then supplemented by combining the first file and the supplementary network information.

9. The writing assistance method according to any one of claims 1 to 8, characterized in that, Also includes: Retrieve user modification actions; Based on the modification operation, the parameters of the writing assistance model are iterated, and the writing assistance model is used to perform the writing assistance.

10. The writing assistance method according to any one of claims 1 to 8, characterized in that, The user's profile information includes at least one of the user's role information, region information, style information, and preference information.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the writing assistance method as described in any one of claims 1 to 10.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the writing assistance method as described in any one of claims 1 to 10.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the writing assistance method as described in any one of claims 1 to 10.