Writing polishing method, system, device and storage medium

By analyzing the user's historical data to determine the writing style and generating personalized writing templates, the problem of lack of personalization and low efficiency of writing embellishment in the existing technology is solved, and high-quality and personalized writing embellishment effect is achieved.

CN119129567BActive Publication Date: 2025-02-07INT DIGITAL ECONOMY ACAD

Patent Information

Application Number
CN202411605569.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-07
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

The existing natural language processing technology ignores users' personalized needs and industry expression habits in writing polishing, resulting in the polishing results being unable to meet users' high efficiency and personalized needs.

Method used

By analyzing the target user's historical reading data and historical writing data, the user's writing style is determined, and a personalized writing template is generated based on this, and a refined text that conforms to the user's style is output based on the trained writing model.

Benefits of technology

The accuracy of writing style feature extraction is improved, and the generated personalized writing templates and polished text are more in line with user needs, reducing users' modification of polished content, and improving writing efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129567B_ABST
    Figure CN119129567B_ABST
Patent Text Reader

Abstract

The present invention discloses a writing polishing method, system, device and storage medium, which obtains the target user's text to be polished, historical reading data and historical writing data within a specified time period; determines the target user's writing style based on the target user's text to be polished, historical reading data and historical writing data; generates a personalized writing template based on the writing style and the text to be polished; inputs the personalized writing template and the text to be polished into a trained writing model, and the trained writing model outputs a target polishing text corresponding to the text to be polished using the personalized writing template as a prompt word. The present invention generates a personalized writing template based on the target user's historical reading data and historical writing data, and then generates a polishing text based on the personalized writing template, so as to obtain a polishing file that is more in line with the target user's writing style, thereby reducing the target user's modification time for the generated polishing text and improving the efficiency of academic writing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing, and in particular to a writing polishing method, system, device and storage medium. Background Art

[0002] Natural Language Processing (NLP) is a branch of artificial intelligence that is used to enable computers to understand, interpret and generate human language, thereby achieving effective communication between humans and computers.

[0003] Natural language processing plays an important role in current writing polishing. It can not only automatically detect and correct grammatical errors, but also analyze sentence structure and complexity to help authors optimize sentences and make them clearer and smoother. However, the current use of natural language processing technology to polish writing is generally based on a general model, but ignores the personalized needs of users when writing, industry expression habits, etc. It is also difficult to provide users with modification and polishing services that match their own style. The output polishing results still need to be manually modified many times, so it cannot meet users' personalized and efficient needs for writing polishing.

[0004] Therefore, the prior art needs to be further improved. Summary of the invention

[0005] The purpose of the present invention is to provide a writing polishing method, system, device and storage medium to overcome the defects of the prior art in writing polishing, such as lack of personalization and low polishing efficiency.

[0006] The technical solution adopted by the present invention to solve the technical problem is as follows:

[0007] In a first aspect, the present application provides a writing polishing method, which includes:

[0008] Determine the writing style of the target user according to the target user's text to be polished, historical reading data and historical writing data within a specified time period;

[0009] Generate a personalized writing template based on the writing style and the text to be polished;

[0010] The personalized writing template and the text to be polished are input into a trained writing model, and the trained writing model outputs a target polished text corresponding to the text to be polished using the personalized writing template as a prompt word.

[0011] Optionally, the step of determining the writing style of the target user according to the target user's text to be polished, historical reading data and historical writing data within a specified time period includes:

[0012] The text to be polished, historical reading data and historical writing data within a specified time period are input into a trained writing preference model to obtain a writing style output by the writing preference model.

[0013] Optionally, the method for generating the writing preference model includes:

[0014] Obtain the texts to be polished, historical reading data, and historical writing data of multiple writing users in different industries;

[0015] The texts to be polished, historical reading data, and historical writing data corresponding to writing users in the same industry are used as a training data set, and the texts to be polished, historical reading data, and historical writing data corresponding to writing users in different industries constitute multiple training data sets;

[0016] The preset network model is trained using each training data set to obtain multiple writing preference models corresponding to different industries.

[0017] Optionally, the step of obtaining historical reading data of multiple writing users in different industries includes:

[0018] Collect reading history information and historical reading behavior data of multiple writing users in different industries; the reading history information includes: one or more of reading paper information and reading paper indicator information; the historical reading behavior data includes: one or more of click, share and comment record information;

[0019] The unique identification, reading history information and historical reading behavior data corresponding to each writing user are associated to obtain the historical reading data of multiple writing users in multiple different industries.

[0020] Optionally, the step of obtaining historical writing data of multiple writing users in different industries further includes:

[0021] Collect writing text information and writing text indicator information of multiple writing users in different industries;

[0022] The unique identifier, writing text information and writing text indicator information corresponding to each writing user are associated to obtain the historical writing data of multiple writing users in different industries.

[0023] Optionally, the step of using each training data set to train the preset network model respectively to obtain multiple writing preference models corresponding to different industries includes:

[0024] A training sample data set is constructed based on the text to be polished, historical reading data, and historical writing data corresponding to each writing user; wherein the training sample data set includes multiple groups of training samples, each group of training samples includes: sample data to be polished, reading sample data, writing sample data, and writing style annotation data;

[0025] Each group of training samples is input into a preset network model in one or more ways of pipeline parallelism, data parallelism and sequence parallelism to train the preset network model and obtain a trained writing preference model.

[0026] Optionally, the method for generating the writing preference model includes:

[0027] Get the text to be polished, historical reading data and historical writing data of a specific user respectively;

[0028] Use the text to be polished to annotate the historical reading data and historical writing data of a specific user to obtain standard data of writing style;

[0029] The preset network model is trained using the text to be polished, historical reading data, historical writing data and writing style annotation data corresponding to the specific user to obtain the trained writing preference model.

[0030] Optionally, the step of training a preset network model using the text to be polished, historical reading data, historical writing data, and writing style annotation data corresponding to a specific user to obtain the trained writing preference model includes:

[0031] A training sample data set is constructed based on the text to be polished, historical reading data, historical writing data, and writing style annotation data corresponding to a specific user; wherein the training sample data set includes multiple groups of training samples, each group of training samples includes: sample data to be polished, reading sample data, writing sample data, and writing style annotation sample data;

[0032] Each group of training samples is input into the preset network model in a Lora-based fine-tuning manner to train the preset network model and obtain a trained writing preference model.

[0033] Optionally, the writing style includes indicators of the text to be polished in various dimensions and scores corresponding to the indicators;

[0034] The step of determining the writing style of the target user based on the target user's text to be polished, historical reading data and historical writing data within a specified time period includes:

[0035] Inputting the text to be polished, historical reading data and historical writing data of a specified time segment into a trained writing preference model to obtain a draft of the writing style output by the writing preference model;

[0036] Receiving modification information input by the target user, adjusting the first draft of the writing style according to the modification information to obtain an adjusted final draft of the writing style; and using the adjusted final draft of the writing style as the writing style of the target user.

[0037] Optionally, the writing style draft includes: initial values ​​of indicators in various dimensions of the text to be polished and initial score values ​​corresponding to each indicator; the modification information includes: indicator adjustment values ​​for adjusting the initial values ​​of indicators in various dimensions, and / or score adjustment values ​​corresponding to each indicator;

[0038] The step of receiving the modification information input by the target user, adjusting the first draft of the writing style according to the modification information, and obtaining the adjusted final draft of the writing style comprises:

[0039] The initial index value in the first draft of the writing style is adjusted according to the index adjustment value included in the modification information, and / or the initial score value in the first draft of the writing style is adjusted according to the score adjustment value included in the modification information to obtain an adjusted final draft of the writing style.

[0040] Optionally, the step of generating a personalized writing template based on the writing style and the text to be polished includes:

[0041] Retrieve basic templates from a writing template knowledge base using writing style as retrieval information;

[0042] The text to be polished is integrated with the basic template to generate a personalized writing template.

[0043] Optionally, the step of combining the text to be polished with the basic template to generate a personalized writing template includes:

[0044] Combine the text to be polished with the corresponding content sections in the basic template to generate a personalized writing template.

[0045] Optionally, the step of generating the writing model includes:

[0046] Collect texts to be edited and personalized writing templates from multiple academic users;

[0047] The personalized writing templates and texts to be polished of each academic user are used as training data to train the preset writing model to obtain a trained writing model.

[0048] Optionally, after the step of inputting the personalized writing template and the text to be polished into a trained writing model, and the trained writing model outputting a target polished text corresponding to the text to be polished using the personalized writing template as a prompt word, the method further includes:

[0049] Inputting the target polished text into a trained writing preference model to obtain a style preference prediction result output by the writing preference model;

[0050] Comparing the style preference prediction result with the writing style to obtain a style comparison result;

[0051] The writing style is adjusted according to the style comparison result and the target polished text is regenerated.

[0052] Optionally, the style preference prediction result and writing style both include indicators of the text to be polished in various dimensions and scores corresponding to the indicators;

[0053] The step of adjusting the writing style according to the style comparison result and regenerating the target polished text comprises:

[0054] Analyze the difference of each indicator in the style comparison result to determine whether it is within a preset difference range;

[0055] When the difference of one or more indicators exceeds the preset difference range, the corresponding adjustment suggestions are output.

[0056] In a second aspect, the present application also provides a writing polishing system, which includes:

[0057] User reading knowledge base, used to store historical reading data of target users;

[0058] User writing knowledge base, used to store the target user's text to be polished and historical writing data;

[0059] A writing preference model, used to determine the writing style of the target user based on the target user's text to be polished, historical reading data and historical writing data within a specified time period;

[0060] A writing template knowledge base, used to generate a personalized writing template based on the writing style and the text to be polished;

[0061] The writing model is used to generate a target polished text corresponding to the text to be polished using the personalized writing template as a prompt word.

[0062] Optionally, the system further comprises: a first adjustment module;

[0063] The first adjustment module is used to receive modification information input by the target user, adjust the writing style according to the modification information, and obtain an adjusted final writing style; and use the adjusted final writing style as the writing style of the target user.

[0064] Optionally, the system further comprises: a second adjustment module;

[0065] The second adjustment module is used to input the target polished text into a trained writing preference model to obtain a style preference prediction result output by the writing preference model; compare the style preference prediction result with the writing style to obtain a style comparison result, and adjust the writing style according to the style comparison result to regenerate the target polished text.

[0066] In a third aspect, the present application provides an electronic device, wherein the electronic device includes a processor and a memory; the memory stores a computer-readable program that can be executed by the processor; and the processor implements the writing polishing method when executing the computer-readable program.

[0067] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more computer-readable programs, and the one or more computer-readable programs can be executed by one or more processors, and when the computer-readable program is executed by the processor, the writing polishing method is implemented.

[0068] Beneficial effects:

[0069] Compared with the prior art, the present application scheme obtains a writing style with writing style characteristics from the historical reading data and historical writing data of the target user, thereby improving the accuracy of writing style feature extraction and accurately forming a characteristic expression of the user's writing preference.

[0070] By combining the writing style draft with user personalized information and the text to be polished, a personalized writing template unique to the target user is generated, abandoning the stereotyped writing template, so that the personalized writing template meets the user's needs through detailed guidance, thereby improving the personalization and flexibility of the writing template.

[0071] Furthermore, the present application generates polished text based on personalized writing templates, and can obtain polished files that are more in line with the writing style of the target user, and are more in line with the user's text expression habits, thereby reducing the modification time of the target user's target polished text, and improving the accuracy of writing information expression and writing efficiency, thereby obtaining high-quality writing texts while retaining the user's personalized characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 A flowchart of the steps of a writing polishing method according to an embodiment of the present invention;

[0073] Figure 2 A schematic diagram of a specific application example of a writing polishing method according to an embodiment of the present invention;

[0074] Figure 3 This is a functional block diagram of a writing polishing system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0075] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0076] At present, more and more information processing can be optimized using artificial intelligence, which can not only improve the efficiency of information processing, but also achieve high-quality information processing results. Artificial intelligence has made significant progress in text generation, automatic translation, and intelligent summarization using natural language processing technology. For example, when writing, users use writing polishing tools to optimize and polish the text. Most of these writing polishing tools are implemented using general models. However, since general models ignore the personalization of the user's own writing style and the user's demand for personalization, it is difficult to provide users with writing texts that match their own style, and therefore cannot meet high-demand writing scenarios.

[0077] In view of the above shortcomings in the prior art, the present application provides a writing polishing method, which determines the target user's writing style draft through the target user's text to be polished, historical reading data and historical writing data within a specified time period; generates a personalized writing template based on the writing style draft and the text to be polished; inputs the personalized writing template and the text to be polished into a trained writing model, and the trained writing model outputs a target polishing text corresponding to the text to be polished using the personalized writing template as a prompt word. In the present application method, since the personalized writing template is generated based on the target user's historical reading data and historical writing data, the polished text generated based on the personalized writing template is more personalized, which reduces the user's modification work on the polishing content and improves the efficiency and quality of the target user's writing.

[0078] The following is combined with Figure 1 , Attachment Figure 2 The writing polishing method, system and storage medium provided in this application are described in detail.

[0079] In the first aspect, the present application provides a writing polishing method, such as Figure 1 As shown, the method includes:

[0080] Step S1: determining the writing style of the target user according to the target user's text to be polished, historical reading data and historical writing data within a specified time period.

[0081] When it is necessary to polish the target user's text to be polished, when the target user's text to be polished is obtained, the target user's historical reading data and historical writing data are also synchronously obtained, and synchronous processing is performed based on the obtained text to be polished, historical reading data and historical writing data to achieve the extraction of personalized information. The step of obtaining the above information in this application can be implemented by a terminal device, which has an information processing function. The terminal device can be a terminal device commonly used by the target user, or a third-party device connected to the terminal device commonly used by the target user. The terminal device and the third-party device can directly or indirectly obtain the text to be polished input by the target user, the target user's historical reading data and historical writing data.

[0082] Furthermore, the text to be polished is the target user's text to be polished, which may be an academic text. The text to be polished is the academic text to be polished input by the target user. The text to be polished may be directly input into the terminal device by the target user, or may be forwarded to the terminal device through a third-party device. Both the terminal device and the third-party device may be a computer, a mobile phone, or a smart wearable device, etc.

[0083] The historical reading data of the target user is the data that the target user has read in the past. It can be all the historical reading data recorded and saved, or it can be the historical reading data within a period of time. The method for collecting these data can be to read the reading software installed on the terminal device used by the target user, and read the reading data generated by the reading software, such as: XX reading APP, xxx reading APP, or xx reader, etc., and the reading data of the user in the historical time can also be obtained by receiving the information input by the target user, such as: the user automatically enters the information of the paper currently being read, and the paper information includes the name of the paper and the author of the paper. The historical reading data can also be the borrowing information of the target user in the library. If the terminal device for obtaining the historical reading data is the terminal used by the target user, the historical reading information can be directly obtained from the record information saved in the APP installed on the system. If the terminal device for obtaining the historical reading data is a third-party device, the third-party device can send an information acquisition request to the terminal device used by the user. After receiving the information acquisition request, the terminal device used by the target user collects the reading data recorded by the APP on the system and sends the collected data to the third-party device.

[0084] In one implementation, the text to be polished is an academic text, and the historical reading data includes but is not limited to the full text of the paper read by the user and paper-related information. The paper-related information includes: the subject classification corresponding to the paper, the paper type, the author information of the paper, the publication time of the paper, and the influence of the paper and other indicators. In order to facilitate the extraction and use of the collected historical reading data, in the specific implementation, the collected historical reading data can be stored in the user reading knowledge base in the form of a table, and the user's unique identifier (for example: user ID or user name) is used as the index of the table. The user's historical reading data under the corresponding user ID or user name can be obtained by querying the user ID or user name.

[0085] Similarly, the historical writing data of the target user refers to the data written by the target user in the past, which can be all the writing data or the writing data within a period of history. The writing data can be text information edited by the user on the terminal, or it can be text information uploaded or saved on the terminal device, or it can be the historical writing data of the target user retrieved from the writing website. The writing data referred to in this step is the paper-related data of the target user. The historical writing data can be the target user's historical academic writing text to be polished, or it can be the target user's historical academic writing text that has been polished. The terminal device can obtain the target user's historical writing data from the saved information, or it can receive the historical writing data input by the target user, and can send a request to obtain it from a third-party device or the cloud to obtain it from a third-party device or the cloud.

[0086] In one implementation, the historical writing data includes but is not limited to the full text of the paper, and may also be paper-related information, which includes: the field to which the text belongs, similar text reference information, and text-related subject content. In a specific implementation, in order to facilitate the storage and access to the collected historical writing data, the collected historical writing data may be stored in the form of a table in a user writing knowledge base. The user's unique identifier (e.g., user ID or user name) is used as the index of the table, and the historical writing data under the corresponding user ID or user name can be obtained by querying the user ID or user name.

[0087] After the target user's text to be polished, historical reading data and historical writing data within a specified time period are obtained in the above steps, the text to be polished, historical reading data and historical writing data are processed to determine the target user's writing style. Since the target user's text to be polished, historical reading data and historical writing data all contain their personalized style characteristics, the target user's writing style can be determined based on the above information.

[0088] Specifically, this step includes: inputting the text to be polished, historical reading data and historical writing data within a specified time period into a trained writing preference model to obtain a writing style output by the writing preference model.

[0089] In one implementation, the text to be polished, historical reading data and historical writing data within a specified time period can be input into a trained writing preference model, and the writing preference model can be used to process the text to be polished, historical reading data and historical writing data to obtain the writing style output by the writing preference model.

[0090] Writing preference model is a technology in the field of artificial natural language processing, which can identify and extract specific preferences presented in text data by analyzing input text data. These preferences can be subtle differences in voice usage, tendencies in topic selection, layout of article structure, or word usage habits.

[0091] The writing preference model can be constructed by collecting and analyzing a large amount of text data and using statistical methods to identify the characteristics of the text data. It can also be constructed by training the text data based on a machine learning algorithm so that the model can automatically identify and imitate the writing style and preferences of the target users. This method requires a large amount of labeled data to train the model. It can also be constructed by building deep learning models, such as recurrent neural networks (RNNs), transformer models, etc., to perform deeper feature extraction and learning on text data, thereby obtaining more accurate identification of the target user's writing preferences.

[0092] In order to obtain more accurate writing preference information of target users, this embodiment selects a method based on deep learning to generate a writing preference model. Different methods are used to generate writing preference models based on the purpose of generating a writing preference model, different users, and different effects to be obtained. In this embodiment, two different methods of generating writing preference models are disclosed. One method generates a writing preference model for obtaining writing preference models for users in different industries, and the other method generates a writing preference model for obtaining a writing preference model for feature extraction of the deep writing style of the target user.

[0093] Specifically, the generation methods of writing preference models used by users in different industries include:

[0094] Step S11, respectively obtaining texts to be polished, historical reading data, and historical writing data of multiple writing users in different industries.

[0095] The texts to be polished, historical reading data and historical writing data of multiple writing users in multiple different industries are collected respectively. The above data collected from each writing user can be data saved in the same terminal device, or can be obtained by obtaining the above data from multiple terminal devices respectively and then aggregating the obtained multiple data.

[0096] Furthermore, the texts to be polished of the multiple writing users are the texts to be polished received by the terminal device by the writing users in the past period of time. The texts to be polished can be directly input into the terminal device by the writing users, or can be forwarded to the terminal device in other ways. Preferably, the texts to be polished are academic texts such as academic papers or academic reports of the writing users.

[0097] The historical reading data and historical writing data of each writing user are also the reading information and writing information of each writing user in the historical period. The historical reading data includes: the full text of the text read by the writing user, the comment information of the text and the text related information. The text related information includes: the subject classification, paper type, author information, paper publication time and paper influence and other indicator information. The historical writing data includes: the writing text entered by the writing user and the writing text related information. The writing text related information includes: the technical field to which the text belongs, similar text references, text related subject content, etc.

[0098] Specifically, the step of obtaining historical reading data of multiple writing users in multiple industries includes:

[0099] Step S111, collect reading history record information and historical reading behavior data of multiple writing users in various industries; the reading history record information includes: one or more of reading text information and reading text indicator information; the historical reading behavior data includes: one or more of record information of clicks, shares and comments.

[0100] The historical reading data of the writing user collected in this step not only includes the reading history information of the writing user itself, but also includes historical reading behavior data. The reading history information includes the reading text information and the reading text indicator related information, while the historical reading behavior data includes the behavior data that may be generated during reading, including: clicking on a keyword in the text, sharing the text, commenting on a paper, or collecting a text. The terminal device obtains the historical reading data by acquiring the data generated by the writing user's past reading behavior.

[0101] Step S112: Associate the unique identification, reading history record information, and historical reading behavior data corresponding to each writing user to obtain multiple groups of historical reading data of writing users from different industries.

[0102] When the historical reading data of each writing user is collected, the writing user and its historical reading data are associated with each other through a unique identifier, so that the writing user can be quickly found through the unique identifier, and it is also convenient to store multiple groups of writing users and their corresponding historical reading data. In one implementation, each writing user ID is associated with its corresponding historical reading data in the form of a table.

[0103] Furthermore, the step of obtaining historical writing data of multiple writing users in different industries includes:

[0104] Step S113: Collect writing text information and writing text indicator information of multiple writing users in different industries.

[0105] In this step, writing file information and writing text index information of multiple writing users are collected respectively. The multiple writing users in this step are the same group of writing users as the writing users in step S111. In this application, historical reading data and historical writing data of the same group of writing users are collected respectively, so as to train a writing preference model using the collected historical reading data and historical writing data.

[0106] Specifically, the writing text information includes: the writing text input by the writing user, and the writing text index information includes: the field to which the writing text belongs, reference texts similar to the writing text, subject content related to the writing text and other index information.

[0107] Step S114: Associate the unique identifier, writing text information and writing text indicator information corresponding to each writing user to obtain multiple groups of historical writing data of the writing users.

[0108] Each writing user is associated with his / her corresponding unique identifier, writing text information and writing text indicator information to form a group of writing user writing data, and multiple groups of writing users and their corresponding writing data constitute multiple groups of historical writing data of the writing users.

[0109] In this step, in order to store the historical reading data and historical writing data of multiple writing users, the collected historical reading data can also be saved in the user reading knowledge base, and the collected historical writing data can be stored in the user writing knowledge base.

[0110] The historical reading data of multiple writing users are stored in a preset arrangement data to construct a user reading knowledge base, and the historical writing data of multiple writing users are stored in a preset arrangement order to construct a user writing knowledge base.

[0111] Each writing user and the data corresponding to it are regarded as a group of data, and multiple writing users and their corresponding data constitute multiple groups of data. The writing data of multiple groups of writing users are stored in the knowledge base in the form of tables, so as to construct a user writing knowledge base.

[0112] Step S12: The texts to be polished, historical reading data and historical writing data corresponding to writing users in the same industry are used as a training data set, and the texts to be polished, historical reading data and historical writing data corresponding to writing users in different industries constitute multiple training data sets.

[0113] In order to obtain writing preference models for users in different industries, in this step, the text to be polished, historical reading data and historical writing data corresponding to writing users in the same industry are used as a training sample set. Since the received writing users come from different industries, the text to be polished, historical reading data and historical writing data corresponding to writing users in multiple different industries can constitute multiple training data sets.

[0114] Step S13: Use each training data set to train the preset network model respectively, and obtain multiple writing preference models corresponding to different industries through training.

[0115] Since each training data set corresponds to different data, different writing preference models can be obtained by training the same preset network model using different training data sets.

[0116] The preset network models are trained using each training data set to obtain multiple writing preference models corresponding to different industries. The specific training steps include:

[0117] For the data collected in each training data set, professionals first perform style annotation to obtain writing style annotation data corresponding to the historical reading data and historical writing data.

[0118] A training sample data set is constructed based on the text to be polished, historical reading data, and historical writing data corresponding to each writing user; wherein the training sample data set includes multiple groups of training samples, each group of training samples includes: sample data to be polished, reading sample data, writing sample data, and writing style annotation data.

[0119] Each group of training samples is input into a preset network model in one or more ways of pipeline parallelism, data parallelism, and sequence parallelism to train the preset network model and obtain a trained writing preference model. In specific implementation, an open source small-scale parameter large model, such as a 7B parameter large model, can be used to train ultra-long sequences through pipeline parallelism, data parallelism, and sequence parallelism.

[0120] In this step, each group of training sample data is input into the preset network model in one or more of pipeline parallelism, data parallelism and sequence parallelism to realize the training of super-long text. Among them, pipeline parallelism is a parallel computing mode that decomposes complex tasks into multiple stages, each stage is executed by different processing units, and each stage immediately passes the result to the next stage after processing the current task, thereby realizing continuous process processing. Data parallelism is a computing mode that divides a large amount of data into multiple small blocks and assigns them to different processing units for simultaneous processing. Each processing unit executes the same program but processes different data blocks. Sequence parallelism is to divide the text sequence into multiple parts and assign them to different processing units for parallel computing, thereby reducing video memory occupancy and improving computing efficiency. In specific implementation, any one of the data processing modes of pipeline parallelism, data parallelism and sequence parallelism can be selected for use, or two or three of them can be combined for use.

[0121] It can be imagined that before constructing the above-mentioned user reading knowledge base and user writing knowledge base, the collected historical reading data and historical writing data need to be preprocessed to improve the quality of the data in the knowledge base.

[0122] After preprocessing the historical reading data and historical writing data, the data also needs to be converted into digital codes that can be understood by machines, and the historical reading data and historical writing data need to be mapped to a high-dimensional vector space so that the historical reading data and historical writing data can be input into the preset network model.

[0123] The preset network model needs to have the ability to generate text. Depending on the accuracy requirements, a simple neural network model or a complex deep learning model can be selected. After the preset network model is selected, the model parameters are initialized and the key parameters of the model training are set to control the training speed and training accuracy. The preprocessed writing user's polished text, historical reading data, and historical writing data are input into the preset network model, and the preset network model is iterated for multiple trainings to obtain a trained writing preference model.

[0124] When training the preset network model, since the text to be polished, historical reading data and historical writing data corresponding to the writing users in the same industry are used as a training data set to construct sample data, the text to be polished, historical reading data and historical writing data corresponding to the writing users in different industries constitute multiple training data sets, thereby obtaining multiple sets of training sample data. Multiple sets of sample data are input into the preset network model for iterative training, thereby obtaining the writing preference model corresponding to each industry.

[0125] Since the training data used in the above steps are from different industries, a writing preference model for users in each industry can be obtained based on the data corresponding to the writing users in each industry. Since the writing styles between different industries may vary greatly, the writing preference model for users in different industries provided in this step can provide more accurate writing style information extraction for users in various industries, thereby improving the quality of writing polishing for users in different industries.

[0126] Furthermore, in order to achieve more accurate writing style feature extraction for a specific user, a writing preference model for extracting the writing style of the specific user is trained, and the present embodiment further includes:

[0127] Get the text to be polished, historical reading data and historical writing data of a specific user respectively;

[0128] Use the text to be polished to annotate the historical reading data and historical writing data of a specific user to obtain standard data of writing style;

[0129] The preset network model is trained using the text to be polished, historical reading data, historical writing data and writing style annotation data corresponding to the specific user to obtain the trained writing preference model.

[0130] In addition, the step of training the preset network model using multiple sets of training sample data corresponding to multiple specific users to obtain the writing preference model includes:

[0131] A training sample data set is constructed based on the text to be polished, historical reading data, historical writing data, and writing style annotation data corresponding to each specific user; wherein the training sample data set includes multiple groups of training samples, each group of training samples includes: sample data to be polished, reading sample data, writing sample data, and writing style annotation sample data;

[0132] Each group of training samples is input into the preset network model in a Lora-based fine-tuning manner to train the preset network model and obtain a trained writing preference model.

[0133] The Lora-based fine-tuning method can handle long text input, and each writing user will be trained to obtain a personalized Lora model.

[0134] In one implementation, the writing preference model trained using the text to be polished, historical reading data, and historical writing data of a specific user outputs the user's style features in JSON format during training, the training sample data is annotated with the corresponding JSON format writing style, and the preset network model selects to use an open source small-scale parameter large model, such as a 7B parameter large model, to achieve a more accurate writing style extraction effect. It can be imagined that the writing preference model trained in this step can be obtained by special training based on a dedicated user, and the data used in the training is the historical reading data and historical writing data of the dedicated user, providing the dedicated user with accurate writing style identification, and achieving the goal of higher quality writing polishing for the dedicated user. Therefore, the specific user can be the target user who has been using the writing preference model in the future, and the specific user can also be a user with a similar writing style to the user who uses the writing preference model in the future. If the user who uses the dedicated writing preference model in the future does not have historical reading data or historical writing data, the historical reading data and historical writing data corresponding to users with similar writing styles can be used to train the dedicated model, thereby improving the accuracy of identifying the writing style of the target user.

[0135] Furthermore, after the writing preference model is trained, the writing style of the target user can be determined based on the target user's text to be polished, historical reading data and historical writing data within a specified time period.

[0136] In the specific application of this application, each user's historical reading data and historical writing data are stored in the knowledge base in the form of a table and bound to the user ID. The historical reading data and historical writing data of the target user within a specified time (for example, within a year or a month) can be queried according to the user ID. The target user's text to be polished, the historical reading data and historical writing data within the specified time period are input into the trained writing preference model, and the target user's writing style draft is output. The target user's writing style is determined based on the target user's writing style draft.

[0137] The writing style outputted in the writing preference model includes the indicators of the text to be polished in various dimensions and the scores corresponding to each indicator. Indicators can represent writing styles from different dimensions, and the scores corresponding to each indicator represent the degree of personalization of the target user on this indicator. If the score corresponding to a certain indicator is high, the target user has a stronger characteristic in this indicator. If the score corresponding to a certain indicator is low, the target user has a weaker characteristic in this indicator.

[0138] For example, in one embodiment, the writing style is: {"Subject area": ​​[{"Computer": 0.8}], "Journal": [{"CVPR": 0.7}], "Purpose of writing": [{"Graduation thesis": 0.79}], "Language style": [{"Formal": 0.9}], "Vocabulary usage": [{"Professional terms": 0.8}, {"Spoken vocabulary": 0.01}], "Emotional color": [{"Positive": 0.3}, {"Negative": 0.1}, {"Objective": 0.6}], "Writing perspective": [{"Objective": 0.94}], "Grammatical features": […], …}.

[0139] In order to obtain a more accurate writing style, determining the writing style of the target user also includes:

[0140] Receiving modification information input by the target user, adjusting the first draft of the writing style according to the modification information to obtain an adjusted final draft of the writing style; and using the adjusted final draft of the writing style as the writing style of the target user.

[0141] When the writing preference model outputs a draft of the writing style corresponding to the target user, the specific content of the draft of the writing style is output to the display screen for display. The target user reviews the displayed draft of the writing style and customizes the score values ​​corresponding to each indicator in the draft of the writing style according to needs, so that each indicator in the adjusted draft of the writing style is more in line with the needs of the target user.

[0142] In one embodiment, in combination Figure 2 As shown, the writing preference model outputs a preliminary draft of the writing style, and outputs the style of the personalized writing result according to the user's text to be polished, and gives style adjustment suggestions, and feeds back the results of the style adjustment suggestions to the user for adjustment.

[0143] Specifically, after the target user modifies the first draft of the writing style, a final draft of the writing style is obtained. The first draft of the writing style includes: the initial values ​​of the indicators in each dimension of the text to be polished and the initial score values ​​corresponding to each indicator; the modification information includes: the indicator adjustment values ​​for adjusting the initial values ​​of the indicators in each dimension, and / or the score adjustment values ​​corresponding to each indicator; Specifically, modifying the first draft of the writing style specifically includes: adjusting the initial values ​​of the indicators in the first draft of the writing style according to the indicator adjustment values ​​contained in the modification information, and / or adjusting the initial score values ​​in the first draft of the writing style according to the score adjustment values ​​contained in the modification information, to obtain the adjusted final draft of the writing style.

[0144] For example, after the target user adjusts the first draft of the writing style, the final draft of the writing style is: {“Subject area”: [{“Natural language processing”: 0.7}], “Journal”: [{“ACL”: 0.8}], “Purpose of writing”: [{“Journal to be published”: 0.9}], “Language style”: [{“Formal”: 0.9}], “Vocabulary usage”: [{“Professional terms”: 0.8}, {“Spoken vocabulary”: 0.01}], “Emotional color”: [{“Positive”: 0.3}, {“Negative”: 0.1}, {“Objective”: 0.6}], “Writing perspective”: [{“Objective”: 0.94}], “Grammatical features”: […], …}.

[0145] Step S2: Generate a personalized writing template based on the writing style and the text to be polished.

[0146] When the writing preference model in the above step S1 is based on the input text to be polished, historical reading data and historical writing data, a draft of the writing style is output, and a personalized writing template is generated based on the draft of the writing style and the text to be polished.

[0147] Since the writing style and the text to be polished are used together to generate a personalized writing template in this step, and the writing style reflects the personalized style of the target user from multiple dimensions, the personalized writing template determined by combining the writing style with the text to be polished can better correspond to the personality of the target user, thus overcoming the disadvantage of using a general writing template while ignoring user personalization.

[0148] Furthermore, the step of generating a personalized writing template based on the writing style and the text to be polished specifically includes:

[0149] Step S21: Using the writing style index as retrieval information, retrieve a basic template from a writing template knowledge base.

[0150] First, the scores corresponding to each indicator included in the first draft of writing style are used as search information to retrieve the basic template from the writing template knowledge base. The writing template knowledge base contains a variety of different types of writing templates. The writing templates contain certain format requirements, which can help users systematically organize the writing text to ensure the logic and fluency of the writing text. Each writing template may include: title, author information, abstract, keywords, introduction, text, discussion, conclusion and references and other content modules.

[0151] The score corresponding to the indicator is used as the search information to match the writing template with the closest score value from the writing template to obtain the basic template. The basic template is the writing template that best matches the scores corresponding to each indicator in the first draft of the writing style after analyzing the scores corresponding to multiple indicators.

[0152] Step S22: The text to be polished is integrated with the basic template to generate a personalized writing template.

[0153] The basic template retrieved in the above step S21 is integrated with the text to be polished to obtain a personalized writing template that best fits the target user.

[0154] Specifically, the specific steps of integrating the text to be polished and the basic template in this step include:

[0155] Combine the text to be polished with the corresponding content sections in the basic template to generate a personalized writing template.

[0156] In the specific implementation, the text to be polished is spliced ​​with the corresponding content in the basic template, that is, the corresponding content is combined together to obtain a personalized writing template. Since the personalized writing template contains the style characteristics of the target user, the personalized writing template is more in line with the writing style of the target user, and the writing content is more personalized and applicable, which can reduce the target user's modification time for the polished text.

[0157] Examples of personalized writing templates are as follows:

[0158] 1. Writing requirements

[0159] Matching academic fields and journals: For those with a background in computer science (80%), refer to the standards of the CVPR journal to ensure that the content conforms to the academic norms of the field.

[0160] Specific actions: Use professional terms related to computer vision and pattern recognition. Emphasize technical details and the innovation of the algorithm. Ensure that the content is consistent with the format and style of the CVPR journal.

[0161] 2. Purpose of writing

[0162] Polish graduation theses (79%) to ensure that the content is clearly structured, logically rigorous, and in compliance with academic standards.

[0163] Specific actions: Emphasize the originality and academic value of the research. Ensure that the chapters are clearly divided, and the abstract, introduction, methods, results, and discussion are clear. The format of citations should meet academic standards.

[0164] 3. Language style

[0165] Use a formal (90%) and objective (94%) language style and avoid colloquial expressions.

[0166] Specific actions: Avoid using the first person, such as "I think", "we found", etc. Use passive voice and third person expressions, such as "research shows", "results show", etc. Avoid expressions with strong emotional colors and maintain a neutral and objective tone.

[0167] 4. Vocabulary Usage

[0168] Prefer professional terminology (80%) and avoid colloquial vocabulary (1%).

[0169] Specific actions: Choose precise and professional terms, such as "algorithm complexity" instead of "algorithm difficulty". Avoid using evaluative words such as "great" and "good". Ensure the technical content and rigor of the vocabulary.

[0170] 5. Emotional Color

[0171] Keep your content objective (60%) and minimize any positive (30%) or negative (10%) sentiment.

[0172] What to do: Use neutral descriptions, such as "the experimental results showed" instead of "surprising findings." Avoid emotionally driven words, such as "exciting results" or "disappointing results." Focus on data and facts, and avoid emotional orientation.

[0173] Step S3: input the personalized writing template and the text to be polished into a trained writing model, and the trained writing model outputs a target polished text corresponding to the text to be polished using the personalized writing template as a prompt word.

[0174] The personalized writing template obtained in the above steps is used as the prompt word of the trained writing model, and is input into the trained writing model together with the text to be polished to obtain the writing model target polished text.

[0175] The writing model refers to a model that uses the goals and requirements of academic research and a standardized writing mode to improve the academic quality of the input academic text. This writing model not only focuses on the structure of the paper, but also on the clarity and fluency of the model's expression, as well as the style characteristics and content of the research. Therefore, the text to be polished can be polished according to the input personalized writing template to obtain a high-quality polished text.

[0176] Specifically, the generation steps of the writing model include:

[0177] Step S31: Collect texts to be polished and personalized writing templates from multiple academic users.

[0178] The academic users collected in this step may or may not be the same group of users as the above-mentioned writing users. Since the trained writing model can output corresponding polished texts according to the personalized writing models of different users and the text to be polished, the writing model is universal and is not limited to specific user types.

[0179] Specifically, the step of collecting texts to be polished and personalized writing templates of multiple academic users can be based on the texts to be polished and the personalized writing templates generated in the step method of the above-mentioned step S2, or can be based on the texts to be polished and the personalized writing templates input by each academic user, or can be separately collected texts to be polished and personalized writing templates corresponding to each academic user, all of which can be used as training data.

[0180] Step S32: using the personalized writing templates of each academic user, the text to be polished, and the corresponding polishing result labels as training data, to train the preset writing model and obtain a trained writing model.

[0181] The personalized writing templates and the text to be polished collected by the academic users in the above step S31 are used as training data and input into the preset writing model to obtain a trained writing model. In one implementation, based on an open source large-scale parameter model, such as a 14B parameter model, pipeline parallelism, data parallelism and sequence parallelism are also used for training.

[0182] Specifically, in this step, the writing style and the text to be polished currently input by the user are spliced ​​to obtain a personalized writing template, and the personalized writing model is used as the prompt word writing model of the academic writing model to obtain the personalized target polished text output by the writing model.

[0183] The personalized writing model is used as the prompt word of the academic writing model, including: extracting key structural and format information from the personalized writing template, and extracting the text fragments to be polished from the text to be polished. Then the extracted prompt words are integrated, that is, the key structural and format information extracted from the personalized writing template and the text fragments extracted from the text to be polished are integrated into an ordered list or paragraph. The integrated list or paragraph is input into the trained writing model to obtain the target polished text output by the writing model that meets academic standards and is personalized for the target user.

[0184] Furthermore, in order to obtain an academic text that is more in line with the personalized style of the target user, after the step of inputting the personalized writing template and the text to be polished into the trained writing model to obtain the target polished text output by the writing model corresponding to the text to be polished, it also includes: regenerating the target polished text after adjusting the writing style.

[0185] In one embodiment, the target polished text output in step S3 is input into the writing preference model, and the writing preference model outputs a style preference prediction result based on the input target polished text. The writing style output by the writing preference model in step S2 is compared with the style preference prediction result output this time to obtain a style comparison result, and then a style adjustment suggestion can be output according to the comparison result.

[0186] Furthermore, the step of adjusting the writing style according to the style comparison result includes:

[0187] Analyze the difference of each indicator in the style comparison result to determine whether it is within a preset difference range;

[0188] When the difference of one or more indicators exceeds the preset difference range, the corresponding adjustment suggestions are output.

[0189] The style comparison results in the above steps include a comparison of the values ​​between different indicators to obtain the difference between the corresponding indicators, and judge whether the size of the difference exceeds the preset difference range. If it exceeds the preset difference range, it is prompted that the value of the indicator needs to be adjusted, otherwise there is no need to adjust the corresponding value of the indicator.

[0190] The method provided in this embodiment analyzes the user's personalized style, extracts his or her writing style, and then generates highly personalized writing content, so that the final polishing result not only conforms to the user's writing habits, but also meets the requirements of academic writing, thereby improving the quality and efficiency of academic writing.

[0191] In one embodiment, the process of the style adjustment suggestion can be implemented through rule matching. For example, if the personalized writing result is mainly based on the user's point of view, and the writing style lacks the indicator of "objective description", the score of "objectivity" in the "writing perspective" is 0.3, and the "objectivity" preference score of the user's writing style is 0.8. After calculation, the difference between the two exceeds 0.2, and it is recommended that the user should increase the score corresponding to the "objectivity" writing style indicator.

[0192] The writing polishing method provided in this embodiment can obtain the style feature portrait of the user's writing by deeply analyzing the behavioral data of the user's academic writing, and polish the academic text based on the style feature portrait of the user's writing, which can significantly improve the personalization and accuracy of text polishing. Compared with the existing general writing auxiliary tools, the present invention can more accurately capture the personalized needs of users, generate academic writing content that conforms to the user's habits and style, and avoid the text inconsistency problem caused by style mismatch in traditional methods.

[0193] The writing polishing method provided in this embodiment can obtain the style feature portrait of the user's writing by deeply analyzing the behavioral data of the user's academic writing, and polish the academic text based on the style feature portrait of the user's writing, which can significantly improve the personalization and accuracy of text polishing. Compared with the existing general writing auxiliary tools, the present invention can more accurately capture the personalized needs of users, generate academic writing content that conforms to the user's habits and style, and avoid the text inconsistency problem caused by style mismatch in traditional methods.

[0194] In the second aspect, the present application provides a writing polishing system based on the above-mentioned writing polishing method, such as Figure 3 As shown, including:

[0195] The user reading knowledge base 310 is used to store the historical reading data of the target user.

[0196] When the system provided in the present application is constructed, the target user's text to be polished is first obtained, and the text to be polished is written into the user writing knowledge base, which also stores the target user's historical writing data. This step also requires collecting the target user's historical reading data and storing the target user's historical reading data in the user reading knowledge base.

[0197] The user writing knowledge base 320 is used to store the target user's text to be polished and historical writing data.

[0198] When collecting the text to be polished and the historical writing data, in order to facilitate the storage of the collected data, the collected text to be polished and the historical writing data may be written into the user writing knowledge base.

[0199] The writing preference model 330 is used to determine the writing style of the target user according to the target user's text to be polished, historical reading data and historical writing data within a specified time period.

[0200] The step of training the writing preference model may be to obtain training samples from the user reading knowledge base and the user writing knowledge base, construct sample data based on the texts to be polished, historical reading data, and historical writing data of multiple writing users obtained from the user reading knowledge base and the user writing knowledge base, and train the preset network model using the constructed sample data to obtain the trained writing preference model.

[0201] The target user's text to be polished, historical reading data, and historical writing data are synchronously input into the trained writing preference model to obtain the first draft of the writing style output by the writing preference model. The first draft of the writing style is displayed to the target user through the display screen, and the target user adjusts the style of the first draft of the writing style according to the needs to obtain the final draft of the writing style.

[0202] The first draft of the writing style is presented to the user in the form of text on the front end, and the user can manually adjust the style. The user can modify the content and score in the style.

[0203] The writing template knowledge base 340 is used to generate a personalized writing template based on the writing style and the text to be polished.

[0204] The adjusted writing style is input into the writing template knowledge base, and the basic template is obtained after retrieval. The basic template is then integrated with the target user's text to be polished to obtain a personalized writing template.

[0205] The writing model 350 is used to generate a target polished text corresponding to the text to be polished using the personalized writing template as a prompt word.

[0206] The personalized writing model and the text to be polished are input into the writing model to obtain the personalized writing result output by the writing model, which is the target polished text.

[0207] The steps of generating a writing model include: collecting texts to be polished and personalized writing templates from multiple academic users, training a preset writing model using the texts to be polished and personalized writing templates from multiple academic users, and obtaining a trained writing model.

[0208] The personalized writing results output by the writing model are input into the writing preference model to obtain the style of the personalized writing results output by the writing preference model, the style of the personalized writing results is compared with the first draft of the writing style, and style adjustment suggestions are output.

[0209] Furthermore, the system also includes: a first adjustment module.

[0210] The first adjustment module is used to receive modification information input by the target user, adjust the preliminary draft of the writing style according to the modification information, and obtain an adjusted final draft of the writing style; and use the adjusted final draft of the writing style as the writing style of the target user.

[0211] Furthermore, the system also includes: a second adjustment module.

[0212] The second adjustment module is used to input the target polished text into a trained writing preference model to obtain a style preference prediction result output by the writing preference model; compare the style preference prediction result with the writing style to obtain a style comparison result, and adjust the writing style according to the style comparison result to regenerate the target polished text.

[0213] In a third aspect, the present application provides an electronic device, wherein the electronic device includes a processor and a memory; the memory stores a computer-readable program that can be executed by the processor; and the processor implements the writing polishing method when executing the computer-readable program.

[0214] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more computer-readable programs, and the one or more computer-readable programs can be executed by one or more processors, and when the computer-readable program is executed by the processor, the writing polishing method is implemented.

[0215] The method, system and storage medium provided in this embodiment generate a personalized writing template based on the user's writing style feature portrait. The template not only meets the standardized requirements of academic writing, but also combines the user's personalized style and writing preferences. Therefore, it can meet the strict academic norms while retaining the user's personalized style. Compared with the traditional template-based writing method, the personalized writing template provided in this embodiment can dynamically adapt to the changes in the writing styles of different users, achieving higher personalization and flexibility.

[0216] Furthermore, the method and system of this embodiment, by combining the user's writing style feature portrait and personalized writing template, uses a large language model to polish and optimize the text input by the user, and finally generates content that meets both writing style preferences and academic standards. Compared with the prior art, the method of the present invention has significant advantages in improving text quality and consistency. Traditional writing tools often find it difficult to take into account both user personality and academic norms at the same time, and the present invention successfully solves this technical problem through intelligent writing assistance, significantly improving the user's writing efficiency and the accuracy of academic expression.

[0217] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this application. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0218] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0219] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.

[0220] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0221] It is understandable that the above embodiments are exemplary and cannot be construed as limitations on the present application. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A writing polishing method, characterized in that: include: Determine the writing style of the target user according to the target user's text to be polished, historical reading data and historical writing data within a specified time period; The step of determining the writing style of the target user based on the target user's text to be polished, historical reading data and historical writing data within a specified time period includes: Inputting the text to be polished, historical reading data and historical writing data within a specified time period into a trained writing preference model to obtain a writing style output by the writing preference model; Generate a personalized writing template based on the writing style and the text to be polished; Inputting the personalized writing template and the text to be polished into a trained writing model, the trained writing model outputting a target polished text corresponding to the text to be polished using the personalized writing template as a prompt word; Inputting the target polished text into a trained writing preference model to obtain a style preference prediction result output by the writing preference model; Comparing the style preference prediction result with the writing style to obtain a style comparison result; Adjust the writing style according to the style comparison result and regenerate the target polished text; The writing style includes the indicators of the text to be polished in various dimensions and the corresponding scores of each indicator; the style comparison result includes a comparison of the numerical values ​​of different indicators, and the difference of the corresponding indicators is obtained according to the comparison result. If the difference exceeds the preset difference range, it is prompted to adjust the value of the indicator.

2. The writing polishing method according to claim 1, characterized in that: The method for generating the writing preference model includes: Obtain the texts to be polished, historical reading data, and historical writing data of multiple writing users in different industries; The texts to be polished, historical reading data, and historical writing data corresponding to writing users in the same industry are used as a training data set, and the texts to be polished, historical reading data, and historical writing data corresponding to writing users in different industries constitute multiple training data sets; The preset network model is trained using each training data set to obtain multiple writing preference models corresponding to different industries.

3. The writing polishing method according to claim 2, characterized in that: The step of obtaining historical reading data of multiple writing users in different industries includes: Collect reading history information and historical reading behavior data of multiple writing users in different industries; the reading history information includes: one or more of reading paper information and reading paper indicator information; the historical reading behavior data includes: one or more of click, share and comment record information; The unique identification, reading history information and historical reading behavior data corresponding to each writing user are associated to obtain the historical reading data of multiple writing users in multiple different industries.

4. The writing polishing method according to claim 2, characterized in that: The step of obtaining historical writing data of multiple writing users in different industries also includes: Collect writing text information and writing text indicator information of multiple writing users in different industries; The unique identifier, writing text information and writing text indicator information corresponding to each writing user are associated to obtain the historical writing data of multiple writing users in different industries.

5. The writing polishing method according to claim 2, characterized in that: The step of using each training data set to train the preset network model to obtain multiple writing preference models corresponding to different industries includes: A training sample data set is constructed based on the text to be polished, historical reading data, and historical writing data corresponding to each writing user; wherein the training sample data set includes multiple groups of training samples, each group of training samples includes: sample data to be polished, reading sample data, writing sample data, and writing style annotation data; Each group of training samples is input into a preset network model in one or more ways of pipeline parallelism, data parallelism and sequence parallelism to train the preset network model and obtain a trained writing preference model.

6. The writing polishing method according to claim 1, characterized in that: The method for generating the writing preference model includes: Get the text to be polished, historical reading data and historical writing data of a specific user respectively; Use the text to be polished to annotate the historical reading data and historical writing data of a specific user to obtain writing style annotation data; The preset network model is trained using the text to be polished, historical reading data, historical writing data and writing style annotation data corresponding to the specific user to obtain the trained writing preference model.

7. The writing polishing method according to claim 6, characterized in that: The step of training a preset network model using the text to be polished, historical reading data, historical writing data, and writing style annotation data corresponding to a specific user to obtain the trained writing preference model includes: A training sample data set is constructed based on the text to be polished, historical reading data, historical writing data, and writing style annotation data corresponding to a specific user; wherein the training sample data set includes multiple groups of training samples, each group of training samples includes: sample data to be polished, reading sample data, writing sample data, and writing style annotation sample data; Each group of training samples is input into the preset network model in a Lora-based fine-tuning manner to train the preset network model and obtain a trained writing preference model.

8. The writing polishing method according to claim 1, characterized in that: The step of determining the writing style of the target user based on the target user's text to be polished, historical reading data and historical writing data within a specified time period includes: Inputting the text to be polished, historical reading data and historical writing data of a specified time segment into a trained writing preference model to obtain a draft of the writing style output by the writing preference model; Receiving modification information input by the target user, adjusting the first draft of the writing style according to the modification information to obtain an adjusted final draft of the writing style; and using the adjusted final draft of the writing style as the writing style of the target user.

9. The writing polishing method according to claim 8, characterized in that: The writing style draft includes: initial values ​​of indicators in various dimensions of the text to be polished and initial score values ​​corresponding to each indicator; the modification information includes: indicator adjustment values ​​for adjusting the initial values ​​of indicators in various dimensions, and / or score adjustment values ​​corresponding to each indicator; The step of receiving the modification information input by the target user, adjusting the first draft of the writing style according to the modification information, and obtaining the adjusted final draft of the writing style comprises: The initial index value in the first draft of the writing style is adjusted according to the index adjustment value included in the modification information, and / or the initial score value in the first draft of the writing style is adjusted according to the score adjustment value included in the modification information to obtain an adjusted final draft of the writing style.

10. The writing polishing method according to claim 1, characterized in that: The step of generating a personalized writing template based on the writing style and the text to be polished includes: Retrieve basic templates from a writing template knowledge base using writing style as retrieval information; The text to be polished is integrated with the basic template to generate a personalized writing template.

11. The writing polishing method according to claim 10, characterized in that: The step of combining the text to be polished with the basic template to generate a personalized writing template includes: Combine the text to be polished with the corresponding content sections in the basic template to generate a personalized writing template.

12. The writing polishing method according to claim 1, characterized in that: The steps of generating the writing model include: Collect texts to be edited and personalized writing templates from multiple academic users; The personalized writing templates and texts to be polished of each academic user are used as training data to train the preset writing model to obtain a trained writing model.

13. The writing polishing method according to claim 1, characterized in that: The style preference prediction result and writing style both include the indicators of the text to be polished in various dimensions and the scores corresponding to each indicator; The step of adjusting the writing style according to the style comparison result and regenerating the target polished text comprises: Analyze the difference of each indicator in the style comparison result to determine whether it is within a preset difference range; When the difference of one or more indicators exceeds the preset difference range, the corresponding adjustment suggestions are output.

14. A writing polishing system, characterized in that: include: User reading knowledge base, used to store historical reading data of target users; User writing knowledge base, used to store the target user's text to be polished and historical writing data; A writing preference model, used to determine the writing style of the target user based on the target user's text to be polished, historical reading data and historical writing data within a specified time period; A writing template knowledge base, used to generate a personalized writing template based on the writing style and the text to be polished; A writing model, used to generate a target polished text corresponding to the text to be polished, using the personalized writing template as a prompt word; The system further comprises: a second adjustment module; The second adjustment module is used to input the target polished text into a trained writing preference model to obtain a style preference prediction result output by the writing preference model; compare the style preference prediction result with the writing style to obtain a style comparison result, and regenerate the target polished text after adjusting the writing style according to the style comparison result; The writing style includes the indicators of the text to be polished in various dimensions and the corresponding scores of each indicator; the style comparison result includes a comparison of the numerical values ​​of different indicators, and the difference of the corresponding indicators is obtained according to the comparison result. If the difference exceeds the preset difference range, it is prompted to adjust the value of the indicator.

15. The writing polishing system according to claim 14, characterized in that: The system further comprises: a first adjustment module; The first adjustment module is used to receive modification information input by the target user, adjust the writing style according to the modification information, and obtain an adjusted final writing style; and use the adjusted final writing style as the writing style of the target user.

16. An electronic device, characterized in that: The electronic device includes a processor and a memory; the memory stores a computer-readable program that can be executed by the processor; when the processor executes the computer-readable program, the writing polishing method according to any one of claims 1 to 13 is implemented.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more computer-readable programs, and the one or more computer-readable programs can be executed by one or more processors. When the computer-readable program is executed by the processor, the writing polishing method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • Article generation method and apparatus based on large language model, and electronic device

    CN117709295A

  • Marketing text generation method and device, electronic equipment and storage medium

    CN118350348A

Cited By

  • Domain knowledge base and large model agent-based official document semantic intelligent optimization method

    CN122509191A